3 # Test for bug https://fedorahosted.org/augeas/ticket/1
5 # Check that putting an invalid node into the tree and saving
6 # leads to failure, and therefore the original file being preserved
8 root=$abs_top_builddir/build/test-bug-1
9 file=$root/etc/logrotate.d/test
12 mkdir -p $(dirname $file)
21 augtool --nostdinc -I $abs_top_srcdir/lenses -r $root > /dev/null <<EOF
22 ins invalid before /files/etc/logrotate.d/rpm/rule[1]
28 if [ $result -eq 0 ] ; then
29 echo "augtool succeeded, but should have failed"
33 if [ ! $file -ef $file.orig ] ; then
34 echo "File was changed, but should not have been"