Debian Codegraph @

third-party/xxhash/tests/cli-comment-line.sh

raw
1 #!/bin/bash
2
3 # Exit immediately if any command fails.
4 # https://stackoverflow.com/a/2871034
5 set -euxo
6
7
8 # Default
9 ./xxhsum ./Makefile > ./.test.xxh
10 echo '# Test comment line' | cat - ./.test.xxh > temp && mv temp ./.test.xxh
11 ./xxhsum --check ./.test.xxh
12
13 # XXH32
14 ./xxhsum -H32 ./Makefile > ./.test.xxh32
15 echo '# Test comment line' | cat - ./.test.xxh32 > temp && mv temp ./.test.xxh32
16 ./xxhsum --check ./.test.xxh32
17
18 # XXH64
19 ./xxhsum -H64 ./Makefile > ./.test.xxh64
20 echo '# Test comment line' | cat - ./.test.xxh64 > temp && mv temp ./.test.xxh64
21 ./xxhsum --check ./.test.xxh64
22
23 # XXH128
24 ./xxhsum -H128 ./Makefile > ./.test.xxh128
25 echo '# Test comment line' | cat - ./.test.xxh128 > temp && mv temp ./.test.xxh128
26 ./xxhsum --check ./.test.xxh128
27
28
29 rm ./.test.xxh
30 rm ./.test.xxh32
31 rm ./.test.xxh64
32 rm ./.test.xxh128