summaryrefslogtreecommitdiff
path: root/tests/static.at
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-11-21 11:35:20 +0700
committerGary V. Vaughan <gary@gnu.org>2011-11-25 14:53:42 +0700
commit962aa919f51cdf8e2cee4fb2d1d9bafa34d50887 (patch)
tree24aa5e523abde226fc35c971d82116eb947da064 /tests/static.at
parent8fad6be03e8eca44e5e771cfbb907d3840a8e01e (diff)
downloadlibtool-962aa919f51cdf8e2cee4fb2d1d9bafa34d50887.tar.gz
syntax-check: fix violations and implement sc_prohibit_test_const_follows_var.
To safely use a non-literal first argument to `test', you must always prepend a literal non-`-' character, but often the second operand is a constant that doesn't begin with a `-' already, so always use `test a = "$b"' instead of noisy `test "X$b" = Xa'. * cfg.mk (sc_prohibit_test_const_follows_var): New syntax-check rule to ensure we don't reintroduce noisy test operands. * bootstrap, build-aux/extract-trace, build-aux/general.m4sh, build-aux/ltmain.m4sh, doc/libtool.texi, libtoolize.m4sh, m4/argz.m4, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at, tests/defs.m4sh, tests/demo-relink.test, tests/demo/configure.ac, tests/depdemo-relink.test, tests/destdir.at, tests/duplicate_conv.at, tests/fail.at, tests/getopt-m4sh.at, tests/help.at, tests/libtoolize.at, tests/link-2.test, tests/link-order2.at, tests/lt_dlopenext.at, tests/mdemo/configure.ac, tests/mdemo2/configure.ac, tests/need_lib_prefix.at, tests/nocase.at, tests/pdemo/configure.ac, tests/pic_flag.at, tests/search-path.at, tests/shlibpath.at, tests/static.at, tests/sysroot.at, tests/tagtrace.test, tests/testsuite.at, tests/with-pic.at: Swap operands to avoid useless noise. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests/static.at')
-rw-r--r--tests/static.at10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/static.at b/tests/static.at
index ef61b1e7..87d9c517 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -130,7 +130,7 @@ func_fix_path ()
# against a broken library but the good one would come later in the PATH.
# So we let the caller of this function set the order: the "other" two
# come first.
- if test "$shlibpath_var" = PATH; then
+ if test PATH = "$shlibpath_var"; then
save_PATH=$PATH
sep=
test -z "$PATH" || sep=:
@@ -141,9 +141,7 @@ func_fix_path ()
func_restore_path ()
{
- if test "$shlibpath_var" = PATH; then
- PATH=$save_PATH
- fi
+ test PATH = "$shlibpath_var" && PATH=$save_PATH
}
# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
@@ -244,11 +242,11 @@ for withdep in no yes; do
done
### install the libraries.
- test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
+ test yes = "$withdep" && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
$LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
$LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
$LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
- test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
+ test yes = "$withdep" && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
# simulate a non-libtool lib:
rm -f $libdir3/liba3.la