Debian Codegraph @

debian/tests/minigzip

raw symbols SCIP
1 #!/bin/bash
2 set -e
3
4 # Compile the test
5 gcc -o minigzip test/minigzip.c -lz
6
7 # Create a sample file
8 echo "This is a test" > original.txt
9
10 # Backup the original file
11 cp original.txt original_backup.txt
12
13 # Compress the file
14 ./minigzip original.txt
15
16 # Decompress the file (output will be original.txt)
17 ./minigzip -d original.txt.gz
18
19 # Verify the decompressed file matches the original
20 diff original.txt original_backup.txt && echo "Files match!" || echo "Files differ"
21
22 # Cleanup
23 rm original.txt original_backup.txt minigzip