From 1e9198f58d7d5616e03dc4b2bb6f738ab4e89f06 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 19 Mar 2017 17:03:44 -0400 Subject: Patch argarray test to work regardless of how configure is invoked. --- test/ChangeLog | 7 +++++++ test/Makefile.am | 12 +++--------- test/Makefile.in | 12 +++--------- test/argarray.ok | 4 ++-- 4 files changed, 15 insertions(+), 20 deletions(-) (limited to 'test') diff --git a/test/ChangeLog b/test/ChangeLog index 8b16532c..04756281 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2017-03-19 Andrew J. Schorr + + * Makefile.am (argarray): Always copy argarray.in to the local + directory as argarray.input instead of trying to figure out whether + $(srcdir) is the current directory. + * argarray.ok: Replace argarray.in with argarray.input. + 2017-01-27 Andrew J. Schorr * Makefile.am (gensub3): New test. diff --git a/test/Makefile.am b/test/Makefile.am index d89e6108..445e77c6 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1348,15 +1348,9 @@ messages:: argarray:: @echo $@ - @case "$(srcdir)" in \ - .) : ;; \ - *) cp "$(srcdir)"/argarray.in . ;; \ - esac - @TEST=test echo just a test | $(AWK) -f "$(srcdir)"/argarray.awk ./argarray.in - >_$@ - @case "$(srcdir)" in \ - .) : ;; \ - *) rm -f ./argarray.in ;; \ - esac + @cp "$(srcdir)"/argarray.in ./argarray.input + @TEST=test echo just a test | $(AWK) -f "$(srcdir)"/argarray.awk ./argarray.input - >_$@ + @rm -f ./argarray.input @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ regtest:: diff --git a/test/Makefile.in b/test/Makefile.in index 5269d0cd..981a1e3b 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1788,15 +1788,9 @@ messages:: argarray:: @echo $@ - @case "$(srcdir)" in \ - .) : ;; \ - *) cp "$(srcdir)"/argarray.in . ;; \ - esac - @TEST=test echo just a test | $(AWK) -f "$(srcdir)"/argarray.awk ./argarray.in - >_$@ - @case "$(srcdir)" in \ - .) : ;; \ - *) rm -f ./argarray.in ;; \ - esac + @cp "$(srcdir)"/argarray.in ./argarray.input + @TEST=test echo just a test | $(AWK) -f "$(srcdir)"/argarray.awk ./argarray.input - >_$@ + @rm -f ./argarray.input @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ regtest:: diff --git a/test/argarray.ok b/test/argarray.ok index 18eb841c..3c026634 100644 --- a/test/argarray.ok +++ b/test/argarray.ok @@ -1,9 +1,9 @@ here we have 3 arguments which are gawk - ./argarray.in + ./argarray.input - Environment variable TEST= and the current input file is called "" -in main loop, this input file is known as "./argarray.in" +in main loop, this input file is known as "./argarray.input" in main loop, this input file is known as "-" -- cgit v1.2.3