]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: simplify some shell code. gary/reredo-test-operand-order
authorGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 13:51:13 +0000 (20:51 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 14:08:04 +0000 (21:08 +0700)
* tests/fail.at: Simplify.
* tests/static.at: Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
tests/fail.at
tests/static.at

index cdc2df791264dc79017b822863c4d5a61d4918a7..90454a2254f02cb21d1f19277decac1bf3aab7f2 100644 (file)
@@ -103,8 +103,8 @@ case $build_libtool_libs in yes)
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c
   (
     . ./c.lo
-    test none != "$pic_object" && echo choke me >"$pic_object"
-    test none != "$non_pic_object" && echo choke me >"$non_pic_object"
+    test none = "$pic_object"     || echo choke me >"$pic_object"
+    test none = "$non_pic_object" || echo choke me >"$non_pic_object"
   )
   FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo])
   AT_CHECK([test -f liba.la], [1])
index a2e87c959b961a85241e7b5438bc22c76169549d..44fa616d34ebe7df9f8dc822659258c2ec26561b 100644 (file)
@@ -141,9 +141,7 @@ func_fix_path ()
 
 func_restore_path ()
 {
-  if test PATH = "$shlibpath_var"; 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