set -e
cd tests
-. tests-common.sh
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
+. "$srcdir/tests/tests-common.sh"
imagex() {
echo "imagex $@"
if ! diff -q -r tmp/dir tmp/myname || ! diff -q -r dir tmp/dir; then
error "Recursive diff of applied WIM with original directory failed"
fi
-if test "`get_link_count tmp/dir/lz.c`" != 1; then
+if test "`get_link_count tmp/dir/lz77.c`" != 1; then
error "Incorrect link count on extracted file"
fi
-if test "`get_link_count tmp/myname/lz.c`" != 1; then
+if test "`get_link_count tmp/myname/lz77.c`" != 1; then
error "Incorrect link count on extracted file"
fi
-if test "`get_inode_number tmp/myname/lz.c`" = "`get_inode_number tmp/dir/lz.c`"; then
+if test "`get_inode_number tmp/myname/lz77.c`" = "`get_inode_number tmp/dir/lz77.c`"; then
error "Incorrect inode number"
fi
rm -rf tmp
if ! diff -q -r tmp/dir tmp/myname || ! diff -q -r dir tmp/dir; then
error "Recursive diff of applied WIM with original directory failed"
fi
-if test "`get_link_count tmp/dir/lz.c`" != 2; then
+if test "`get_link_count tmp/dir/lz77.c`" != 2; then
error "Incorrect link count on extracted file"
fi
-if test "`get_link_count tmp/myname/lz.c`" != 2; then
+if test "`get_link_count tmp/myname/lz77.c`" != 2; then
error "Incorrect link count on extracted file"
fi
-if test "`get_inode_number tmp/myname/lz.c`" != "`get_inode_number tmp/dir/lz.c`"; then
+if test "`get_inode_number tmp/myname/lz77.c`" != "`get_inode_number tmp/dir/lz77.c`"; then
error "Incorrect inode number"
fi
rm -rf tmp
# Test exporting an image to another WIM, then applying it.
# We try with 5 different combinations of compression types to make sure we go
# through all paths in the resource-handling code.
-for i in `seq 1 3`; do
+for i in 1 2 3 4 5; do
case $i in
1)
cflag1="--compress=none";