From f436c8378b3de1e239435c91af80bf69227755b7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 19 Nov 2006 01:14:34 +0000 Subject: [PATCH] * tests/autotest.at (BSx641-newline in command): (BS-BS-newline in command, BSx640-newline in command): (Newline-CODE-BS-newline in command): (Single-quote-BS-newline in command): (Single-quote-newline-BS-newline in command): Use printf '%s\n' instead of echo, for portability to hosts where echo interprets backslashes. This will break on hosts that lack printf, but for now let's assume all such hosts are dead (if not, we should get reports of test failures). --- ChangeLog | 12 ++++++++++++ tests/autotest.at | 12 ++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba202016..a8a084e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-11-18 Paul Eggert + + * tests/autotest.at (BSx641-newline in command): + (BS-BS-newline in command, BSx640-newline in command): + (Newline-CODE-BS-newline in command): + (Single-quote-BS-newline in command): + (Single-quote-newline-BS-newline in command): + Use printf '%s\n' instead of echo, for portability to hosts + where echo interprets backslashes. This will break on hosts + that lack printf, but for now let's assume all such hosts + are dead (if not, we should get reports of test failures). + 2006-11-17 Paul Eggert 'echo' has some portability problems, when given a first argument diff --git a/tests/autotest.at b/tests/autotest.at index ee61c159..b632f064 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -191,12 +191,12 @@ echo GNU], 0, [GNU ], [])]) AT_CHECK_AT_TEST([BSx641-newline in command], - [AT_CHECK([echo Auto"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\ "conf], 0, [Auto\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\conf ], [])]) AT_CHECK_AT_TEST([BS-BS-newline in command], - [AT_CHECK([echo Auto"\\ + [AT_CHECK([printf '%s\n' Auto"\\ "conf], 0, [Auto\ conf ], [])]) @@ -204,27 +204,27 @@ conf # A `^BS-BS-newline in command' test will run a command named `\'. No, thanks. AT_CHECK_AT_TEST([BSx640-newline in command], - [AT_CHECK([echo Auto"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ conf ], [])]) # This command has both escaped and unescaped newlines. AT_CHECK_AT_TEST([Newline-CODE-BS-newline in command], - [AT_CHECK([echo Auto' + [AT_CHECK([printf '%s\n' Auto' 'co\ nf], 0, [Auto conf ], [])]) AT_CHECK_AT_TEST([Single-quote-BS-newline in command], - [AT_CHECK([echo Auto'\ + [AT_CHECK([printf '%s\n' Auto'\ 'conf], 0, [Auto\ conf ], [])]) AT_CHECK_AT_TEST([Single-quote-newline-BS-newline in command], - [AT_CHECK([echo Auto' + [AT_CHECK([printf '%s\n' Auto' \ 'conf], 0, [Auto \ -- 2.11.4.GIT