]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0011-hashmap.sh
Merge branch 'ja/l10n-fixes'
[thirdparty/git.git] / t / t0011-hashmap.sh
index 3f1f505e8937f391666a1b7e6d9b972a5f146974..5343ffd3f92c1637bb60719d812a01e0ab6d4064 100755 (executable)
@@ -9,15 +9,6 @@ test_hashmap() {
        test_cmp expect actual
 }
 
-test_expect_success 'hash functions' '
-
-test_hashmap "hash key1" "2215982743 2215982743 116372151 116372151" &&
-test_hashmap "hash key2" "2215982740 2215982740 116372148 116372148" &&
-test_hashmap "hash fooBarFrotz" "1383912807 1383912807 3189766727 3189766727" &&
-test_hashmap "hash foobarfrotz" "2862305959 2862305959 3189766727 3189766727"
-
-'
-
 test_expect_success 'put' '
 
 test_hashmap "put key1 value1
@@ -179,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' '