Welcome to mirror list, hosted at ThFree Co, Russian Federation.

t0095-bloom.sh « t - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2dad8c4a94eb9040b6e771cfcf9fa0af5675dd78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

test_description='Testing the various Bloom filter computations in bloom.c'
. ./test-lib.sh

test_expect_success 'compute unseeded murmur3 hash for empty string' '
	cat >expect <<-\EOF &&
	Murmur3 Hash with seed=0:0x00000000
	EOF
	test-tool bloom get_murmur3 "" >actual &&
	test_cmp expect actual
'

test_expect_success 'compute unseeded murmur3 hash for test string 1' '
	cat >expect <<-\EOF &&
	Murmur3 Hash with seed=0:0x627b0c2c
	EOF
	test-tool bloom get_murmur3 "Hello world!" >actual &&
	test_cmp expect actual
'

test_expect_success 'compute unseeded murmur3 hash for test string 2' '
	cat >expect <<-\EOF &&
	Murmur3 Hash with seed=0:0x2e4ff723
	EOF
	test-tool bloom get_murmur3 "The quick brown fox jumps over the lazy dog" >actual &&
	test_cmp expect actual
'

test_done