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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
|
#!/bin/bash
#
# Copyright (c) 2011, 2012, Simon Howard
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose with or without fee is hereby granted, provided
# that the above copyright notice and this permission notice appear
# in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#
# Test script that uses the dump-headers tool to read the file
# headers from test archives and compares them to some known good
# values.
#
. test_common.sh
test_archive() {
local archive=$1
local expected="output/$archive-hdr.txt"
./dump-headers "archives/$archive" > "$wd/hdr.txt"
if [ ! -e "$expected" ]; then
echo "New file: $expected"
cp "$wd/hdr.txt" "$expected"
cat "$expected"
fi
if ! diff -u "$expected" "$wd/hdr.txt"; then
fail "Output not as expected for $archive"
fi
rm -f "$wd/hdr.txt"
}
test_archive larc333/lz4.lzs
test_archive larc333/lz5.lzs
test_archive larc333/sfx.com
test_archive larc333/subdir.lzs
test_archive larc333/long.lzs
test_archive lharc113/lh0.lzh
test_archive lharc113/lh1.lzh
test_archive lharc113/sfx.com
test_archive lharc113/subdir.lzh
test_archive lharc113/long.lzh
test_archive lha213/lh0.lzh
test_archive lha213/lh5.lzh
test_archive lha213/lh5_long.lzh
test_archive lha213/sfx.exe
test_archive lha213/subdir.lzh
test_archive lha255e/lh0.lzh
test_archive lha255e/lh5.lzh
test_archive lha255e/sfx.exe
test_archive lha255e/subdir.lzh
test_archive lha_unix114i/h0_lh0.lzh
test_archive lha_unix114i/h0_lh5.lzh
test_archive lha_unix114i/h0_lh6.lzh
test_archive lha_unix114i/h0_lh7.lzh
#test_archive lha_unix114i/h0_subdir.lzh
test_archive lha_unix114i/h0_symlink.lzh
test_archive lha_unix114i/h1_lh0.lzh
test_archive lha_unix114i/h1_lh5.lzh
test_archive lha_unix114i/h1_lh6.lzh
test_archive lha_unix114i/h1_lh7.lzh
test_archive lha_unix114i/h1_subdir.lzh
test_archive lha_unix114i/h1_symlink.lzh
test_archive lha_unix114i/h1_symlink2.lzh
test_archive lha_unix114i/h1_symlink3.lzh
test_archive lha_unix114i/h2_lh0.lzh
test_archive lha_unix114i/h2_lh5.lzh
test_archive lha_unix114i/h2_lh6.lzh
test_archive lha_unix114i/h2_lh7.lzh
test_archive lha_unix114i/h2_subdir.lzh
test_archive lha_unix114i/h2_symlink2.lzh
test_archive lha_unix114i/h2_symlink3.lzh
test_archive lha_unix114i/h2_symlink.lzh
test_archive lha_unix114i/lh6_long.lzh
test_archive lha_unix114i/lh7_long.lzh
test_archive lha_os2_208/lh0.lzh
test_archive lha_os2_208/lh5.lzh
test_archive lha_os2_208/lfn.lzh
test_archive lha_os2_208/subdir.lzh
test_archive lha_os2_208/lh1.lzh
test_archive lha_os2_208/h3_lfn.lzh
test_archive lha_os2_208/h3_lh0.lzh
test_archive lha_os2_208/h3_lh5.lzh
test_archive lha_os2_208/h3_subdir.lzh
test_archive pmarc124/pm0.pma
test_archive pmarc124/pm1.pma
test_archive pmarc124/pm1_long.pma
test_archive pmarc124/mtcd.pma
test_archive pmarc2/pm0.pma
test_archive pmarc2/pm2.pma
test_archive pmarc2/comment.pma
test_archive pmarc2/sfx.com
test_archive pmarc2/long.pma
test_archive lha_amiga_122/level0.lzh
test_archive lha_amiga_122/level1.lzh
test_archive lha_amiga_122/level2.lzh
test_archive lha_amiga_122/lh0.lzh
test_archive lha_amiga_122/lh1.lzh
test_archive lha_amiga_122/lh4_long.lzh
test_archive lha_amiga_122/lh4.lzh
test_archive lha_amiga_122/lh5.lzh
test_archive lha_amiga_122/subdir.lzh
test_archive lha_amiga_122/sfx.run
test_archive lha_amiga_212/level0.lzh
test_archive lha_amiga_212/level1.lzh
test_archive lha_amiga_212/level2.lzh
test_archive lha_amiga_212/lh1.lzh
test_archive lha_amiga_212/lh6.lzh
test_archive lharc_atari_313a/lh0.lzh
test_archive lharc_atari_313a/lh5.lzh
test_archive lharc_atari_313a/lz5.lzh
test_archive lharc_atari_313a/subdir.lzh
test_archive lharc_atari_313a/sfx.tos
test_archive lharc_atari_313a/shorter.lzh
test_archive lharc_atari_313a/h1_lh5.lzh
test_archive lharc_atari_313a/h1_lz5.lzh
test_archive lharc_atari_313a/h1_subdir.lzh
test_archive lharc_atari_313a/h2_lh5.lzh
test_archive lharc_atari_313a/h2_lz5.lzh
test_archive lharc_atari_313a/h2_subdir.lzh
test_archive lha_x68k_213/h0_lh0.lzh
test_archive lha_x68k_213/h0_lh5.lzh
test_archive lha_x68k_213/h0_subdir.lzh
test_archive lha_x68k_213/h1_lh0.lzh
test_archive lha_x68k_213/h1_lh5.lzh
test_archive lha_x68k_213/h1_subdir.lzh
test_archive lha_x68k_213/h2_lh0.lzh
test_archive lha_x68k_213/h2_lh5.lzh
test_archive lha_x68k_213/h2_subdir.lzh
test_archive lha_x68k_213/sfx.x
test_archive maclha_224/l0_lh0.lzh
test_archive maclha_224/l0_lh1.lzh
test_archive maclha_224/l0_lh5.lzh
test_archive maclha_224/l0_nm_lh5.lzh
test_archive maclha_224/l1_full_subdir.lzh
test_archive maclha_224/l1_lh0.lzh
test_archive maclha_224/l1_lh1.lzh
test_archive maclha_224/l1_lh5.lzh
test_archive maclha_224/l1_nm_lh5.lzh
test_archive maclha_224/l1_subdir.lzh
test_archive maclha_224/l2_full_subdir.lzh
test_archive maclha_224/l2_lh0.lzh
test_archive maclha_224/l2_lh1.lzh
test_archive maclha_224/l2_lh5.lzh
test_archive maclha_224/l2_nm_lh5.lzh
test_archive maclha_224/l2_subdir.lzh
test_archive lhmelt_16536/h0_lh0.lzh
test_archive lhmelt_16536/h0_lh1.lzh
test_archive lhmelt_16536/h0_lh5.lzh
test_archive lhmelt_16536/h0_lh6.lzh
test_archive lhmelt_16536/h0_lh7.lzh
test_archive lhmelt_16536/h0_subdir.lzh
test_archive lhmelt_16536/h1_lh0.lzh
test_archive lhmelt_16536/h1_lh1.lzh
test_archive lhmelt_16536/h1_lh5.lzh
test_archive lhmelt_16536/h1_subdir.lzh
test_archive lhmelt_16536/h2_lh0.lzh
test_archive lhmelt_16536/h2_lh1.lzh
test_archive lhmelt_16536/h2_lh5.lzh
test_archive lhmelt_16536/h2_subdir.lzh
test_archive lhmelt_16536/sfx_winsfx_213.exe
test_archive lhmelt_16536/sfx_winsfxm_250.exe
test_archive lhmelt_16536/sfx_winsfx32_213.exe
test_archive lhmelt_16536/sfx_winsfx32m_250.exe
test_archive lha_osk_201/h0_lh0.lzh
test_archive lha_osk_201/h0_lh1.lzh
test_archive lha_osk_201/h0_lh5.lzh
#test_archive lha_osk_201/h0_subdir.lzh
test_archive lha_osk_201/h1_lh0.lzh
test_archive lha_osk_201/h1_lh1.lzh
test_archive lha_osk_201/h1_lh5.lzh
test_archive lha_osk_201/h1_subdir.lzh
test_archive lha_osk_201/h2_lh0.lzh
test_archive lha_osk_201/h2_lh1.lzh
test_archive lha_osk_201/h2_lh5.lzh
test_archive lha_osk_201/h2_subdir.lzh
test_archive lha_os9_211c/h0_lh0.lzh
test_archive lha_os9_211c/h0_lh1.lzh
test_archive lha_os9_211c/h0_subdir.lzh
test_archive lha_os9_211c/h1_lh0.lzh
test_archive lha_os9_211c/h1_lh1.lzh
test_archive lha_os9_211c/h1_subdir.lzh
test_archive lha_os9_211c/h2_lh0.lzh
test_archive lha_os9_211c/h2_lh1.lzh
test_archive lha_os9_211c/h2_subdir.lzh
test_archive unlha32/h2_lhx.lzh
test_archive unlha32/lhx_long.lzh
test_archive regression/abspath.lzh
test_archive regression/badterm.lzh
test_archive regression/truncated.lzh
test_archive regression/unixsep.lzh
test_archive generated/lzs/lzs.lzs
test_archive generated/lzs/long.lzs
test_archive generated/pm1/pm1.pma
|