~dricottone/my-utils

ref: 6e88ef836939f27f3c6d1e830639bda8a895ed58 my-utils/tests/init.sh -rwxr-xr-x 894 bytes
6e88ef83Dominic Ricottone Refactor tests 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

mkdir tests/static

# compression target
printf "[1]\n[2]\n[3]\n\n" > tests/static/compression_target.txt

# debom target
printf "\xEF\xBB\xBFfoo bar\n" > tests/static/debom_target.txt

# rebom target
printf "foo bar\n" > tests/static/rebom_target.txt

# decompression targets
printf "(a)\n(b)\n(c)\n\n" > tests/static/decompression_result.txt
tar -C tests/static -cf tests/static/decompression_target.tar decompression_result.txt
tar -C tests/static -czf tests/static/decompression_target.tar.gz decompression_result.txt
tar -C tests/static -cJf tests/static/decompression_target.tar.xz decompression_result.txt
tar -C tests/static --zstd -cf tests/static/decompression_target.tar.zst decompression_result.txt
tar -C tests/static -cjf tests/static/decompression_target.tar.bz2 decompression_result.txt
mv tests/static/decompression_result.txt tests/static/decompression_target.txt