tests: use more portable flags in test-fix.t
authorDanny Hooper <hooper@google.com>
Mon, 07 Jan 2019 15:25:41 -0800
changeset 41126 d8f5c615e811
parent 41125 126101284e04
child 41129 074c72a38423
tests: use more portable flags in test-fix.t `head --lines N` is known to not exist on OSX. Differential Revision: https://phab.mercurial-scm.org/D5517
hgext/fix.py
tests/test-fix.t
--- a/hgext/fix.py	Mon Jan 07 21:43:06 2019 +0900
+++ b/hgext/fix.py	Mon Jan 07 15:25:41 2019 -0800
@@ -62,8 +62,8 @@
 in a text file by ensuring that 'sort' runs before 'head'::
 
   [fix]
-  sort:command = sort --numeric-sort
-  head:command = head --lines=10
+  sort:command = sort -n
+  head:command = head -n 10
   sort:pattern = numbers.txt
   head:pattern = numbers.txt
   sort:priority = 2
--- a/tests/test-fix.t	Mon Jan 07 21:43:06 2019 +0900
+++ b/tests/test-fix.t	Mon Jan 07 15:25:41 2019 -0800
@@ -173,8 +173,8 @@
   in a text file by ensuring that 'sort' runs before 'head':
   
     [fix]
-    sort:command = sort --numeric-sort
-    head:command = head --lines=10
+    sort:command = sort -n
+    head:command = head -n 10
     sort:pattern = numbers.txt
     head:pattern = numbers.txt
     sort:priority = 2
@@ -1159,10 +1159,10 @@
 
   $ cat >> .hg/hgrc <<EOF
   > [fix]
-  > head:command = head --lines=5
+  > head:command = head -n 5
   > head:pattern = numbers.txt
   > head:priority = 1
-  > sort:command = sort --numeric-sort
+  > sort:command = sort -n
   > sort:pattern = numbers.txt
   > sort:priority = 2
   > EOF