diff tests/test-check-sdist.t @ 6919:6859ed744625 mercurial-5.1

test-compat: merge mercurial-5.2 into mercurial-5.1
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 25 Oct 2024 17:55:54 +0400
parents b2dddcfe87c3
children
line wrap: on
line diff
--- a/tests/test-check-sdist.t	Thu Jun 27 01:07:01 2024 +0400
+++ b/tests/test-check-sdist.t	Fri Oct 25 17:55:54 2024 +0400
@@ -11,16 +11,17 @@
 
 #if test-repo
 
-  $ hg archive "$TESTTMP"/hg-evolve
+  $ . "$RUNTESTDIR/helpers-testrepo.sh"
+  $ testrepohg archive "$TESTTMP"/hg-evolve
   $ cd "$TESTTMP"/hg-evolve
 
 #endif
 
   $ "$PYTHON" setup.py sdist --dist-dir "$TESTTMP"/dist > /dev/null
-  */dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob)
-    warnings.warn(msg)
-  warning: sdist: standard file not found: should have one of README, README.txt (?)
-   (?)
+  */dist.py:*: UserWarning: Unknown distribution option: 'long_description_content_type' (glob) (?)
+    warnings.warn(msg) (?)
+  */dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) (?)
+    warnings.warn(msg) (?)
   warning: no previously-included files found matching 'docs/tutorial/.netlify'
   warning: no previously-included files found matching '.gitlab-ci.yml'
   warning: no previously-included files found matching '.hg-format-source'
@@ -30,35 +31,40 @@
   no previously-included directories found matching '.gitlab'
   $ cd "$TESTTMP"/dist
 
-  $ find hg-evolve-*.tar.gz -size +800000c
-  hg-evolve-*.tar.gz (glob)
+  $ find hg?evolve-*.tar.gz -size +800000c
+  hg?evolve-*.tar.gz (glob)
 
-  $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files
-  $ egrep '^tests/test-.*\.(t|py)$' files > test-files
-  $ egrep -v '^tests/test-.*\.(t|py)$' files > other-files
-  $ wc -l other-files
-  148 other-files
-  $ wc -l test-files
-  ??? test-files (glob)
-  $ fgrep debian files
+  $ tar -tzf hg?evolve-*.tar.gz | sed 's|^hg.evolve-[^/]*/||' | sort > ../files
+  $ grep -E '^tests/test-.*\.(t|py)$' ../files > ../test-files
+  $ grep -E -v '^tests/test-.*\.(t|py)$' ../files > ../other-files
+  $ wc -l ../other-files
+  ??? ../other-files (glob)
+  $ wc -l ../test-files
+  ??? ../test-files (glob)
+  $ grep -F debian ../files
   tests/test-check-debian.t
-  $ fgrep __init__.py files
+  $ grep -F __init__.py ../files
   hgext3rd/__init__.py
   hgext3rd/evolve/__init__.py
   hgext3rd/evolve/thirdparty/__init__.py
   hgext3rd/topic/__init__.py
-  $ fgrep common.sh files
+  $ grep -F common.sh ../files
   docs/tutorial/testlib/common.sh
   tests/testlib/common.sh
-  $ fgrep README files
+  $ grep -F README ../files
   README.rst
   docs/README
   docs/tutorial/README.rst
   hgext3rd/topic/README
 
-  $ egrep '(gitlab|contrib|hack|format-source)' files
+  $ grep -E '(gitlab|contrib|hack|format-source)' ../files
+  [1]
+  $ grep -F legacy.py ../files
+  [1]
+  $ grep -F netlify ../files
   [1]
-  $ fgrep legacy.py files
-  [1]
-  $ fgrep netlify files
-  [1]
+
+#if twine
+  $ twine --no-color check *
+  Checking hg?evolve-*.tar.gz: PASSED (glob)
+#endif