automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: reorganize tests on backslash issues


From: Stefano Lattarini
Subject: [PATCH] tests: reorganize tests on backslash issues
Date: Wed, 2 Jan 2013 14:44:00 +0100

* t/backsl.sh, t/backsl2.sh, t/backsl3.sh: Merge ...
* t/backslash-issues.sh: ... into this test.
* t/backsl4.sh: Rename ...
* t/backslash-before-trailing-whitespace.sh: ... like this.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/backsl.sh                                        | 34 ----------------------
 t/backsl2.sh                                       | 30 -------------------
 ....sh => backslash-before-trailing-whitespace.sh} |  0
 t/{backsl3.sh => backslash-issues.sh}              | 30 +++++++++++++++----
 t/list-of-tests.mk                                 |  6 ++--
 5 files changed, 26 insertions(+), 74 deletions(-)
 delete mode 100755 t/backsl.sh
 delete mode 100755 t/backsl2.sh
 rename t/{backsl4.sh => backslash-before-trailing-whitespace.sh} (100%)
 rename t/{backsl3.sh => backslash-issues.sh} (63%)
 mode change 100755 => 100644

diff --git a/t/backsl.sh b/t/backsl.sh
deleted file mode 100755
index f316ac2..0000000
--- a/t/backsl.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test for "\" problems.  Bug report from Joerg-Martin Schwarz.
-
-. test-init.sh
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = \
-   frob
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep '^_SOURCE' Makefile.in && exit 1
-exit 0
diff --git a/t/backsl2.sh b/t/backsl2.sh
deleted file mode 100755
index ae33894..0000000
--- a/t/backsl2.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# We must skip the backslash, not complain about './\' not existing.
-# Reported by Rick Scott <address@hidden>
-
-. test-init.sh
-
-cat > Makefile.am << 'END'
-SUBDIRS = \
-   .
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-:
diff --git a/t/backsl4.sh b/t/backslash-before-trailing-whitespace.sh
similarity index 100%
rename from t/backsl4.sh
rename to t/backslash-before-trailing-whitespace.sh
diff --git a/t/backsl3.sh b/t/backslash-issues.sh
old mode 100755
new mode 100644
similarity index 63%
rename from t/backsl3.sh
rename to t/backslash-issues.sh
index eed651e..9dae715
--- a/t/backsl3.sh
+++ b/t/backslash-issues.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-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
@@ -14,16 +14,34 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure we diagnose trailing backslash at the end of a file.
-# Report from Akim Demaile <address@hidden>.
+# Test for "\" problems.
+# TODO: might be nice to convert this to TAP...
 
 . test-init.sh
 
+echo AC_PROG_CC >> configure.ac
+$ACLOCAL
+
+# Bug report from Joerg-Martin Schwarz.
 cat > Makefile.am << 'END'
-foo = \
+bin_PROGRAMS = \
+   frob
 END
+$AUTOMAKE
+grep '^_SOURCE' Makefile.in && exit 1
 
-$ACLOCAL
+# We must skip the backslash, not complain about './\' not existing.
+# Reported by Rick Scott <address@hidden>
+cat > Makefile.am << 'END'
+SUBDIRS = \
+   .
+END
+$AUTOMAKE
+
+# Make sure we diagnose trailing backslash at the end of a file.
+# Report from Akim Demaile <address@hidden>.
+echo 'foo = \' > Makefile.am
 AUTOMAKE_fails
-cat stderr
 grep 'trailing backslash' stderr
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index ba96774..2a042ef 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -185,10 +185,8 @@ t/backcompat2.sh \
 t/backcompat3.sh \
 t/backcompat6.sh \
 t/backcompat-acout.sh \
-t/backsl.sh \
-t/backsl2.sh \
-t/backsl3.sh \
-t/backsl4.sh \
+t/backslash-issues.sh \
+t/backslash-before-trailing-whitespace.sh \
 t/badline.sh \
 t/badopt.sh \
 t/badprog.sh \
-- 
1.8.1.rc3.27.g3b73c7d




reply via email to

[Prev in Thread] Current Thread [Next in Thread]