code on that platform. Solaris 2.4 has not been supported since
2003 and nowadays it's better to omit that old trick.
+- Autotest provides a new macro AT_DATA_UNQUOTED, similar to AT_DATA
+ but processing variable substitutions, command substitutions and
+ backslashes in the contents argument.
+
+
* Noteworthy changes in release 2.69 (2012-04-24) [stable]
** Autoconf now requires perl 5.6 or better (but generated configure
@sp 1
@defmac AT_DATA (@var{file}, @var{contents})
+@defmacx AT_DATA_UNQUOTED (@var{file}, @var{contents})
@atindex{DATA}
Initialize an input data @var{file} with given @var{contents}. Of
course, the @var{contents} have to be properly quoted between square
expansion. @var{contents} must be empty or end with a newline.
@var{file} must
be a single shell word that expands into a single file name.
+
+The difference between @code{AT_DATA} and @code{AT_DATA_UNQUOTED} is
+that only the latter performs shell variable expansion (@samp{$}),
+command substitution (@samp{`}), and backslash escaping (@samp{\})
+on @var{contents}.
@end defmac
@defmac AT_CHECK (@var{commands}, @dvar{status, 0}, @ovar{stdout}, @
])# AT_BANNER
+# AT_DATA_UNQUOTED(FILE, CONTENTS)
+# -----------------------
+# Initialize an input data FILE with given CONTENTS, which should be
+# empty or end with a newline.
+# This macro is not robust to active symbols in CONTENTS *on purpose*.
+# If you don't want CONTENTS to be evaluated, quote it twice.
+# In addition, it does not quote shell variables. For example, it
+# can be used to generate data files containing a carriage return.
+_AT_DEFINE_SETUP([AT_DATA_UNQUOTED],
+[m4_if([$2], [], [: >$1],
+ [$2], [[]], [: >$1],
+[cat >$1 <<_ATEOF
+$2[]_ATEOF
+])])
+
+
# AT_DATA(FILE, CONTENTS)
# -----------------------
# Initialize an input data FILE with given CONTENTS, which should be
])
+## ------------------ ##
+## AT_DATA_UNQUOTED. ##
+## ------------------ ##
+
+AT_CHECK_AT_TEST([AT@&t@_DATA_UNQUOTED], [
+AT_CHECK([test -f file1], [1])
+AT_DATA([file1])
+AT_CHECK([test -f file1 && test ! -s file1])
+AT_CHECK([echo hi > file1])
+AT_DATA([file1], [[]])
+AT_CHECK([test -f file1 && test ! -s file1])
+file=file2
+AT_DATA_UNQUOTED([$file], [[$file
+]])
+AT_CHECK([echo file2 > file3])
+AT_CHECK([cmp file2 file3])
+])
+
+
## ------------------ ##
## Empty test suite. ##
## ------------------ ##