Blame SOURCES/autoconf-2.69-bash-5-LINENO.patch

8229d4
From 4c1f7a361f4fd6180b7b46b950e3bfe389b5b831 Mon Sep 17 00:00:00 2001
8229d4
From: Ondrej Dubaj <odubaj@redhat.com>
8229d4
Date: Wed, 28 Aug 2019 07:39:50 +0200
8229d4
Subject: [PATCH] Port tests to Bash 5
8229d4
    
8229d4
* tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP):
8229d4
Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when
8229d4
comparing variable space dumps.
8229d4
(AT_CONFIG_CMP): Also ignore LINENO.
8229d4
* tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'.
8229d4
8229d4
---
8229d4
 tests/local.at | 5 ++++-
8229d4
 tests/m4sh.at  | 4 ++--
8229d4
 2 files changed, 6 insertions(+), 3 deletions(-)
8229d4
8229d4
diff --git a/tests/local.at b/tests/local.at
8229d4
index 40b7318..f3ad2b5 100644
8229d4
--- a/tests/local.at
8229d4
+++ b/tests/local.at
8229d4
@@ -324,7 +324,7 @@ if test -f state-env.before && test -f state-env.after; then
8229d4
       [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC],
8229d4
       [GREP|[EF]GREP|SED],
8229d4
       [[_@]|.[*#?$].],
8229d4
-      [argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
8229d4
+      [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
8229d4
      $act_file ||
8229d4
        test $? -eq 1 || echo failed >&2
8229d4
     ) 2>stderr-$act_file |
8229d4
@@ -381,6 +381,9 @@ do
8229d4
 	/'\'\\\$\''=/ d
8229d4
 	/^argv=/ d
8229d4
 	/^ARGC=/ d
8229d4
+  /^BASH_ARGC=/ d
8229d4
+  /^BASH_ARGV=/ d
8229d4
+  /^LINENO=/ d
8229d4
 	' $act_file >at_config_vars-$act_file
8229d4
 done
8229d4
 AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl
8229d4
diff --git a/tests/m4sh.at b/tests/m4sh.at
8229d4
index 4e4da5d..80684ca 100644
8229d4
--- a/tests/m4sh.at
8229d4
+++ b/tests/m4sh.at
8229d4
@@ -254,7 +254,7 @@ AT_CHECK([autom4te -l m4sh $1.as -o $1])
8229d4
 # `_oline_', once processed and ran, produces our reference.
8229d4
 # We check that we find ourselves by looking at a string which is
8229d4
 # available only in the original script: `_oline_'.
8229d4
-AT_DATA_LINENO([reference], [false], [__OLINE__], [_oline__])
8229d4
+AT_DATA_LINENO([reference], [true], [__OLINE__], [_oline__])
8229d4
 AT_CHECK([./reference], 0, [stdout])
8229d4
 
8229d4
 # The reference:
8229d4
@@ -264,7 +264,7 @@ mv stdout expout
8229d4
 # Be sure to be out of the PATH.
8229d4
 AT_CHECK([mkdir test || exit 77])
8229d4
 
8229d4
-AT_DATA_LINENO([test/test-1], [false], [__LINENO__], [LINENO])
8229d4
+AT_DATA_LINENO([test/test-1], [true], [__LINENO__], [LINENO])
8229d4
 AT_CHECK([./test/test-1],                          0, [expout])
8229d4
 AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-1)],
8229d4
 						   0, [expout])
8229d4
-- 
8229d4
2.19.1
8229d4