@cryptotaxi247 / kubo / commits / 1f1507106

test: implement test_sort_cmp()

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Mar 20, 2015 at 22:31 UTC 1f1507106ab74127cbc3dfc8afe1c06d3dc47776
1 file changed +6
test/ipfs-test-lib.sh
+6
@@ -16,3 +16,9 @@ test_cmp() {
16 diff -q "$@" >/dev/null || test_fsh diff -u "$@"
17 }
18
19 +# Same as test_cmp above, but we sort files before comparing them.
20 +test_sort_cmp() {
21 + sort "$1" >"$1_sorted" &&
22 + sort "$2" >"$2_sorted" &&
23 + test_cmp "$1_sorted" "$2_sorted"
24 +}