diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-11-26 14:11:14 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-11-26 14:11:14 +0300 |
commit | cf9383412494964d6188fcf08a362c0c0f313afc (patch) | |
tree | bd9e6a5b3a63cbb155b81112c855c19cb5f2b314 /debian/tests/ndbm | |
download | perl-debian.tar.gz |
Import perl (5.30.0-9)debian/5.30.0-9debian
Diffstat (limited to 'debian/tests/ndbm')
-rwxr-xr-x | debian/tests/ndbm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/tests/ndbm b/debian/tests/ndbm new file mode 100755 index 0000000..101ff1f --- /dev/null +++ b/debian/tests/ndbm @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +ARCH=$(dpkg --print-architecture) +DATA=debian/tests/data + +[ -d $DATA/$ARCH ] || exit 77 + +TDIR=$(mktemp -d) +echo "testing NDBM reading..." + +for pag in $DATA/$ARCH/*-ndbm.pag; do + base=$(basename $pag .pag) + cp $pag $TDIR + dir=$(echo $pag | sed 's/\.pag$/.dir/') + if [ -e $dir ]; then + cp $dir $TDIR + else + # NDBM compat in stretch and earlier made .dir a hardlink to .pag + ln $TDIR/$base.pag $TDIR/$base.dir || exit 77 + fi + perl -MFcntl -MNDBM_File -le 'tie %h, q(NDBM_File), shift, O_RDWR, 0640 or die "opening NDBM file failed: $!"; die "contents of NDBM file not found?" if !$h{foo}; print $h{foo}' $TDIR/$base | grep OK +done + +rm -r "$TDIR" |