########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1987-2011 AT&T Intellectual Property #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
# Florham Park NJ #
# #
# Glenn Fowler <gsf@research.att.com> #
# #
########################################################################
# testpax [ + ] [ - ] [ tar-path ] [ pax-path ] [ pax-options ... ]
#
# + execution trace
# - don't clean up pax.tmp
# . exit on first failure (and don't clean up)
# tar-path tar the old and new archives
#
# @(#)testpax (AT&T Labs Research) 2003-10-01
typeset -Z TEST=00
bail=
clobber=1
while :
do case $1 in
+) PS4='+$LINENO+ '; shift; set -x ;;
-) clobber=; shift ;;
.) bail=1; shift ;;
*) break ;;
esac
done
case $1 in
esac
case $1 in
esac
case $1 in
/*) ;;
*) cmd=$1
shift
;;
esac
print -u2 "TEST $@"
fmt="--format=${format%.*}"
cd $tmp
status=0
cd old
for i in a b c d e f g
do print $i$i$i > $i
done
ln a i
ln b j
ln -s c k
ln -s d m
esac
cd ..
cd new
if false
for i in a b c d e f g
do print $i$i$i > $i
done
ln a i
ln b j
ln -s c k
ln -s d m
print "xxxx" > ca
print "ccc" > csubdir/h
fi
rm a
sleep 1
print DDD > d
print zzz > z
rm m
ln -s e m
esac
cd ..
cd rep
cd ..
00) result= ;;
esac
1:?*) exit 1 ;;
esac
status=0
sleep 1
sleep 1
cd old
esac
cd ../new
esac
cd ..
cd rep
cd ..
00) result= ;;
esac
1:?*) exit 1 ;;
esac
status=0
cd old
cd ../new
rm -r *
cd ..
00) result= ;;
esac
1:?*) exit 1 ;;
esac
cd ..
done
cd $tmp
: rw test
status=0
00) result= ;;
esac
1:?*) exit 1 ;;
esac
: conversion test
x=ascii
echo $x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x > a
do cat a a > b
cat b b > a
done
if cmp -s a b
then result=
else result=" FAILED"
fi
1:?*) exit 1 ;;
esac
?*) cd ..
;;
esac
1) plural= ;;
*) plural=s ;;
esac