Bump to 1.14.1
[platform/upstream/augeas.git] / tests / test-span-rec-lens.sh
1 # This test checks that https://github.com/hercules-team/augeas/issues/397 is
2 # fixed. It would otherwise lead to a segfault in augtool
3
4 if [ -z "$abs_top_builddir" ]; then
5     echo "abs_top_builddir is not set"
6     exit 1
7 fi
8
9 if [ -z "$abs_top_srcdir" ]; then
10     echo "abs_top_srcdir is not set"
11     exit 1
12 fi
13
14 ROOT=$abs_top_builddir/build/test-span-rec-lens
15 LENSES=$abs_top_srcdir/lenses
16
17 FILE=$ROOT/etc/default/im-config
18
19 rm -rf $ROOT
20 mkdir -p $(dirname $FILE)
21 cat <<EOF > $FILE
22 if [ 1 ]; then
23 # K
24 else
25 # I
26 fi
27 EOF
28
29 # If bug 397 is not fixed, this will abort because of memory corruption
30 augtool --nostdinc -I $LENSES -r $ROOT --span rm /files >/dev/null