Merge branch 'sg/commit-graph-validate'
[gitweb.git] / t / t0011-hashmap.sh
index 9c96b3e3b10a99c20a1e6f5d4d0349c4fbcb0a10..5343ffd3f92c1637bb60719d812a01e0ab6d4064 100755 (executable)
@@ -170,31 +170,45 @@ NULL
 '
 
 test_expect_success 'iterate' '
-
-test_hashmap "put key1 value1
-put key2 value2
-put fooBarFrotz value3
-iterate" "NULL
-NULL
-NULL
-key2 value2
-key1 value1
-fooBarFrotz value3"
-
+       test-tool hashmap >actual.raw <<-\EOF &&
+       put key1 value1
+       put key2 value2
+       put fooBarFrotz value3
+       iterate
+       EOF
+
+       cat >expect <<-\EOF &&
+       NULL
+       NULL
+       NULL
+       fooBarFrotz value3
+       key1 value1
+       key2 value2
+       EOF
+
+       sort <actual.raw >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'iterate (case insensitive)' '
-
-test_hashmap "put key1 value1
-put key2 value2
-put fooBarFrotz value3
-iterate" "NULL
-NULL
-NULL
-fooBarFrotz value3
-key2 value2
-key1 value1" ignorecase
-
+       test-tool hashmap ignorecase >actual.raw <<-\EOF &&
+       put key1 value1
+       put key2 value2
+       put fooBarFrotz value3
+       iterate
+       EOF
+
+       cat >expect <<-\EOF &&
+       NULL
+       NULL
+       NULL
+       fooBarFrotz value3
+       key1 value1
+       key2 value2
+       EOF
+
+       sort <actual.raw >actual &&
+       test_cmp expect actual
 '
 
 test_expect_success 'grow / shrink' '