]>
git.cameronkatri.com Git - cgit.git/blob - tests/t0107-snapshot.sh
3 test_description
='Verify snapshot'
6 test_expect_success
'get foo/snapshot/master.tar.gz' '
7 cgit_url "foo/snapshot/master.tar.gz" >tmp
10 test_expect_success
'check html headers' '
12 grep "Content-Type: application/x-gzip" &&
15 grep "Content-Disposition: inline; filename=.master.tar.gz."
18 test_expect_success
'strip off the header lines' '
19 tail -n +6 tmp > master.tar.gz
22 test_expect_success
'verify gzip format' '
23 gunzip --test master.tar.gz
26 test_expect_success
'untar' '
31 test_expect_success
'count files' '
33 test_line_count = 5 output
36 test_expect_success
'verify untarred file-5' '
37 grep "^5$" master/file-5 &&
38 test_line_count = 1 master/file-5
41 test_expect_success
'get foo/snapshot/master.zip' '
42 cgit_url "foo/snapshot/master.zip" >tmp
45 test_expect_success
'check HTML headers (zip)' '
47 grep "Content-Type: application/x-zip" &&
50 grep "Content-Disposition: inline; filename=.master.zip."
53 test_expect_success
'strip off the header lines (zip)' '
54 tail -n +6 tmp >master.zip
57 test_expect_success
'verify zip format' '
61 test_expect_success
'unzip' '
66 test_expect_success
'count files (zip)' '
68 test_line_count = 5 output
71 test_expect_success
'verify unzipped file-5' '
72 grep "^5$" master/file-5 &&
73 test_line_count = 1 master/file-5