D5238: tests: work around `tac` not being portable

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Nov 7 13:30:31 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2ad56a9b983b: tests: work around `tac` not being portable (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5238?vs=12466&id=12468

REVISION DETAIL
  https://phab.mercurial-scm.org/D5238

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -1,6 +1,11 @@
 A script that implements uppercasing of specific lines in a file. This
 approximates the behavior of code formatters well enough for our tests.
 
+  $ TAC="$TESTTMP/tac.py"
+  $ cat > $TAC <<EOF
+  > import sys
+  > print('\n'.join(sys.stdin.read().splitlines()[::-1]))
+  > EOF
   $ UPPERCASEPY="$TESTTMP/uppercase.py"
   $ cat > $UPPERCASEPY <<EOF
   > import sys
@@ -1117,7 +1122,7 @@
   $ printf "first\nsecond\n" > bar.txt
   $ hg add -q
   $ hg fix -w --config fix.sometool:fileset=bar.txt \
-  >           --config fix.sometool:command=tac
+  >           --config fix.sometool:command="$PYTHON $TAC"
   the fix.tool:fileset config name is deprecated; please rename it to fix.tool:pattern
 
   $ cat foo.whole



To: durin42, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list