Use new text accessors.
[geda-gaf/berndj.git] / libgeda / tests / attribnamevalue.sh
blob999573bb78458c3f30ce8bab7ae50f41d778c1d6
1 #!/bin/sh
3 if test "x$srcdir" = x; then
4 srcdir=.
5 fi
7 expected=`mktemp -t nvXXXXXX`
8 input=`mktemp -t nvXXXXXX`
10 cat >$input <<EOF
11 foo=bar
12 foo[17]=$bar[42]
13 foo = bar
14 foo= bar
15 foo =bar
16 EOF
18 cat >$expected <<EOF
19 foo=bar
20 foo[17]=$bar[42]
21 NO_ATTRIB
22 NO_ATTRIB
23 NO_ATTRIB
24 EOF
26 tr '\n' '\0' <$input |xargs -r0 -n 1 $srcdir/attribnamevalue |diff $expected -
28 status=$?
30 rm -f $expected $input
32 exit $status