File: test_afsegment.sh

package info (click to toggle)
afflib 3.5.12-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,168 kB
  • ctags: 4,723
  • sloc: cpp: 21,800; ansic: 14,696; sh: 9,697; makefile: 531; python: 95
file content (21 lines) | stat: -rwxr-xr-x 494 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Test the afsegment command

export PATH=$srcdir:../tools:../../tools:.:$PATH
BLANK_BASE=`mktemp -t blankXXXXX`
BLANK_AFF=$BLANK_BASE.aff
unset AFFLIB_PASSPHRASE

echo === Putting a new metadata segment into blank.aff  ===

/bin/rm -f $BLANK_AFF
afcopy /dev/null $BLANK_AFF
afsegment -ssegname=testseg1 $BLANK_AFF
if [ x"testseg1" = x`afsegment -p segname $BLANK_AFF` ] ; then 
  echo afsegment worked!
else
  echo afsegment does not work properly
  exit 1
fi
/bin/rm -f $BLANK_AFF