Skip to content

Commit e817b12

Browse files
committed
fixed problem in tests where Mac OS X sort gives different results than GNU sort under Linux
1 parent ba163ba commit e817b12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test_cmds.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,11 @@ function test_jsonrange(){
646646
assert_empty "test_jsonrange (result1)" "$R"
647647

648648
if [ -f temp.txt ]; then rm temp.txt; fi
649+
if [ -f temp2.txt ]; then rm temp2.txt; fi
649650
bin/jsonrange -i how-to/jsonrange/person.json -values | sort > temp.txt
651+
sort "how-to/jsonrange/expected2.txt" > temp2.txt
650652
assert_exists "test_jsonrange (expected2)" temp.txt
651-
R=$(cmp how-to/jsonrange/expected2.txt temp.txt)
653+
R=$(cmp temp2.txt temp.txt)
652654
assert_empty "test_jsonrange (expected2)" "$R"
653655

654656
if [ -f temp.txt ]; then rm temp.txt; fi
@@ -694,6 +696,7 @@ function test_jsonrange(){
694696
assert_empty "test_jsonrange (expected9)" "$R"
695697

696698
if [ -f temp.txt ]; then rm temp.txt; fi
699+
if [ -f temp2.txt ]; then rm temp2.txt; fi
697700
echo "test_jsonrange OK";
698701
}
699702

0 commit comments

Comments
 (0)