summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-10-25 09:34:11 +0700
committerGary V. Vaughan <gary@gnu.org>2011-11-17 19:22:14 +0700
commite628dd85c18f06d0e0c85a9459410341e8502701 (patch)
tree030448488d5f545c9d3e9eda6fb83eb6de1c12e8 /tests
parent42c96694c18cec1eefdf622a94fbef3fa3499ea1 (diff)
downloadlibtool-e628dd85c18f06d0e0c85a9459410341e8502701.tar.gz
syntax-check: fix violations and re-enable sc_space_tab.
* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of disabled checks. (exclude_file_name_regexp--sc_space_tab): Don't flag space-tab sequences in diff files as an error. * Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg, build-aux/ltmain.m4sh, libltdl/loaders/dyld.c, libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk, libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c, tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at, tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at, tests/stresstest.at, tests/template.at: Fix space-tab sequences by reversing them in regexps, and deleting leading spaces in indentation. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/demo/dlmain.c6
-rw-r--r--tests/depdemo/main.c2
-rw-r--r--tests/libtoolize.at2
-rw-r--r--tests/lt_dladvise.at2
-rw-r--r--tests/pdemo/longer_file_name_dlmain.c6
-rwxr-xr-xtests/sh.test20
-rw-r--r--tests/static.at4
-rw-r--r--tests/stresstest.at4
-rw-r--r--tests/template.at12
9 files changed, 29 insertions, 29 deletions
diff --git a/tests/demo/dlmain.c b/tests/demo/dlmain.c
index 8c8be09e..495ae7cb 100644
--- a/tests/demo/dlmain.c
+++ b/tests/demo/dlmain.c
@@ -54,13 +54,13 @@ main ()
const char *name = s->name;
printf ("found symbol: %s\n", name);
if (!strcmp ("hello", name))
- phello = (int(*)())s->address;
+ phello = (int(*)())s->address;
else if (!strcmp ("foo", name))
- pfoo = (int(*)())s->address;
+ pfoo = (int(*)())s->address;
else if (!strcmp ("nothing", name))
#ifndef _WIN32
/* In an ideal world we could do this... */
- pnothing = (int*)s->address;
+ pnothing = (int*)s->address;
#else /* !_WIN32 */
/* In an ideal world a shared lib would be able to export data */
pnothing = (int*)&nothing;
diff --git a/tests/depdemo/main.c b/tests/depdemo/main.c
index c4569b31..73e4db08 100644
--- a/tests/depdemo/main.c
+++ b/tests/depdemo/main.c
@@ -42,7 +42,7 @@ main (int argc, char **argv)
if (var_l1 + var_l2 + var_l4 != 20)
{
printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 20\n",var_l1,var_l2,var_l4);
- return 1;
+ return 1;
}
return 0;
}
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 030ece79..70ba9410 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -713,7 +713,7 @@ func_serial ()
my_filename="$1"
my_macro_regex="$2"
my_sed_serial='
- /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ {
+ /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ {
s,^# serial \([1-9][0-9.]*\).*$,\1,
q
}
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index 5ae9fbd9..48cf5e96 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -174,7 +174,7 @@ hint_global (void)
/* Don't attempt to load moddepend unless modglobal was successfully
loaded and the symglobal hint was taken, and the system allows to
- have undefined symbols. */
+ have undefined symbols. */
if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
{
hint_ext ();
diff --git a/tests/pdemo/longer_file_name_dlmain.c b/tests/pdemo/longer_file_name_dlmain.c
index ad223dce..73caa78d 100644
--- a/tests/pdemo/longer_file_name_dlmain.c
+++ b/tests/pdemo/longer_file_name_dlmain.c
@@ -54,13 +54,13 @@ main (int argc, char **argv)
const char *name = s->name;
printf ("found symbol: %s\n", name);
if (!strcmp ("hello", name))
- phello = (int(*)())s->address;
+ phello = (int(*)())s->address;
else if (!strcmp ("foo", name))
- pfoo = (int(*)())s->address;
+ pfoo = (int(*)())s->address;
else if (!strcmp ("nothing", name))
#ifndef _WIN32
/* In an ideal world we could do this... */
- pnothing = (int*)s->address;
+ pnothing = (int*)s->address;
#else /* !_WIN32 */
/* In an ideal world a shared lib would be able to export data */
pnothing = (int*)&nothing;
diff --git a/tests/sh.test b/tests/sh.test
index 3382dad3..5c6d675d 100755
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -31,37 +31,37 @@
status=$EXIT_SUCCESS
# Check for bad binary operators.
-if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then
+if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then
echo "use \`if test \$something =' instead of \`if \$something ='"
status=$EXIT_FAILURE
fi
# Check for bad unary operators.
-if $EGREP -n -e 'if[ ]+-' $scripts; then
+if $EGREP -n -e 'if[ ]+-' $scripts; then
echo "use \`if test -X' instead of \`if -X'"
status=$EXIT_FAILURE
fi
# Check for using `[' instead of `test'.
-if $EGREP -n -e 'if[ ]+\[' $scripts; then
+if $EGREP -n -e 'if[ ]+\[' $scripts; then
echo "use \`if test' instead of \`if ['"
status=$EXIT_FAILURE
fi
# Check for using test X... instead of test "X...
-if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X' $scripts; then
+if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X' $scripts; then
echo "use \`test \"X...\"' instead of \`test X'"
status=$EXIT_FAILURE
fi
# Check for using test $... instead of test "$...
-if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$' $scripts; then
+if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$' $scripts; then
echo "use \`test \"\$...\"' instead of \`test \$'"
status=$EXIT_FAILURE
fi
# Never use test -e.
-if $EGREP -n -e 'test[ ]+(![ ])?-e' $scripts; then
+if $EGREP -n -e 'test[ ]+(![ ])?-e' $scripts; then
echo "use \`test -f' instead of \`test -e'"
status=$EXIT_FAILURE
fi
@@ -80,7 +80,7 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
fi
# Check for using set -- instead of set dummy
-if $EGREP -n -e 'set[ ]+--[ ]+' $scripts; then
+if $EGREP -n -e 'set[ ]+--[ ]+' $scripts; then
echo "use \`set dummy ...' instead of \`set -- ...'"
status=$EXIT_FAILURE
fi
@@ -89,7 +89,7 @@ fi
for s in $scripts
do
if $SED -n '
- /set[ ][ ]*dummy/{
+ /set[ ][ ]*dummy/{
/set.*dummy.*;.*shift/d
N
/\n.*shift/D
@@ -107,7 +107,7 @@ do
if $SED -n '
/^func_.*(/{
N
- /^func_[^ ]* ()\n{$/d
+ /^func_[^ ]* ()\n{$/d
p
}' "$s" 2>&1 | $EGREP .; then
echo "Function definitions should look like this in $s:
@@ -124,7 +124,7 @@ done
for s in "$abs_macro_dir/libtool.m4"
do
if $SED -n '/case \$cc_basename in/,/esac/ {
- /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p
+ /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p
}' $s 2>&1 | $EGREP .; then
echo "\$cc_basename matches should include a trailing \`*' in $s."
status=$EXIT_FAILURE
diff --git a/tests/static.at b/tests/static.at
index dfa4c42c..6072d772 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -301,8 +301,8 @@ for withdep in no yes; do
[0], [ignore], [ignore])
dnl # This usually fails. So don't do it.
dnl AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123b$EXEEXT m.$OBJEXT \
- dnl -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
- dnl [0], [ignore], [ignore])
+ dnl -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
+ dnl [0], [ignore], [ignore])
fi
### install the programs.
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 9568d498..c9caee2d 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -273,12 +273,12 @@ do
esac
LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la],
- [0],[ignore],[ignore])
+ [0],[ignore],[ignore])
LT_AT_EXEC_CHECK([./main],[0])
for l10 in '' '-export-symbols dlselfsyms'
do
LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10],
- [0],[ignore],[ignore])
+ [0],[ignore],[ignore])
LT_AT_EXEC_CHECK([./sub3/dlself],[0])
done
done
diff --git a/tests/template.at b/tests/template.at
index 1729778d..74e1cfd9 100644
--- a/tests/template.at
+++ b/tests/template.at
@@ -218,12 +218,12 @@ case $compiler_c_o in
yes)
main_o=sub/main.$OBJEXT
AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
;;
*)
main_o=main.$OBJEXT
AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
;;
esac
@@ -270,17 +270,17 @@ LT_AT_EXEC_CHECK([./sub/main])
if $noskip; then
AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
LT_AT_EXEC_CHECK([./sub/main])
fi
# both installed
if $noskip; then
AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la],
- [0], [ignore], [ignore])
+ [0], [ignore], [ignore])
LT_AT_EXEC_CHECK([./sub/main])
fi