#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Check that automake lex support ensures that lex-generated C
# files use correct "#line" directives. Try also with the
# 'subdir-object' option enabled.
-# See also sister test 'yacc-line.test'.
+# See also sister test 'yacc-line.sh'.
required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
ls -l . sub sub/dir
$EGREP 'line|\.l' $c_outputs
- grep '#.*line.*build.*\.l' $c_outputs && Exit 1
+ grep '#.*line.*build.*\.l' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the absolute
# srcdir.
- $EGREP '#.*line *"?/.*\.l' $c_outputs && Exit 1
+ $EGREP '#.*line *"?/.*\.l' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the default
# output file names, e.g., 'lex.yy.c'.
- grep '#.*line.*lex\.yy' $c_outputs && Exit 1
+ grep '#.*line.*lex\.yy' $c_outputs && exit 1
# Look out for a silly regression.
- grep "#.*\.l.*\.l" $c_outputs && Exit 1
+ grep "#.*\.l.*\.l" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c