java tests: use $PATH_SEPARATOR where appropriate
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 2 May 2011 22:48:02 +0000 (00:48 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 2 May 2011 22:48:02 +0000 (00:48 +0200)
* tests/java-compile-run-nested.test: Use `$PATH_SEPARATOR', not
`:', to separate entries of extended PATH and CLASSPATH variables.
* tests/java-compile-run-flat.test: Likewise.

ChangeLog
tests/java-compile-run-flat.test
tests/java-compile-run-nested.test

index 0031f1e..d66603e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       java tests: use $PATH_SEPARATOR where appropriate
+       * tests/java-compile-run-nested.test: Use `$PATH_SEPARATOR', not
+       `:', to separate entries of extended PATH and CLASSPATH variables.
+       * tests/java-compile-run-flat.test: Likewise.
+
 2011-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        java coverage: test JAVACFLAGS and AM_JAVACFLAGS
index ccf7c11..76fde6c 100755 (executable)
@@ -26,6 +26,8 @@ required='java javac'
 
 set -e
 
+echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.in
+
 cat >> configure.in <<'END'
 AC_SUBST([JAVA], [java])
 AC_CONFIG_SRCDIR([PkgLocation.jin])
@@ -73,7 +75,8 @@ bin_SCRIPTS = jprog
 
 edit_script = sed -e 's|[@]JAVA@|$(JAVA)|g' \
                   -e 's|[@]javadir@|$(javadir)|g' \
-                  -e 's|[@]SHELL@|$(SHELL)|g'
+                  -e 's|[@]SHELL@|$(SHELL)|g' \
+                  -e 's|[@]PATH_SEPARATOR@|$(PATH_SEPARATOR)|g'
 
 jprog: jprog.sh
        rm -f $@ $@-t
@@ -87,7 +90,7 @@ END
 
 cat > jprog.sh <<'END'
 #!@SHELL@
-CLASSPATH=${jprog_classpath-'@javadir@'}${CLASSPATH+":$CLASSPATH"}
+CLASSPATH=${jprog_classpath-'@javadir@'}${CLASSPATH+"@PATH_SEPARATOR@$CLASSPATH"}
 export CLASSPATH
 case $# in
   0) exec @JAVA@ Main;;
@@ -150,11 +153,11 @@ TESTS_ENVIRONMENT = \
     if test x"$$jprog_doing_installcheck" != x"yes"; then \
         jprog_classpath='$(abs_top_builddir):$(abs_top_srcdir)'; \
         export jprog_classpath; \
-        PATH='$(abs_top_builddir)':$$PATH; \
+        PATH='$(abs_top_builddir)$(PATH_SEPARATOR)'$$PATH; \
         export PATH; \
     else \
         unset jprog_classpath || :; \
-        PATH='$(prefix)/bin':$$PATH; \
+        PATH='$(prefix)/bin$(PATH_SEPARATOR)'$$PATH; \
         export PATH; \
     fi; \
     config_time_prefix='@prefix@'; export config_time_prefix;
index f5fcaa1..1a9abfd 100755 (executable)
@@ -27,6 +27,8 @@ required='java javac'
 
 set -e
 
+echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.in
+
 cat >> configure.in <<'END'
 AC_SUBST([JAVA], [java])
 AC_CONFIG_SRCDIR([jprog/PkgLocation.jin])
@@ -79,7 +81,8 @@ bin_SCRIPTS = jprog
 
 edit_script = sed -e 's|[@]JAVA@|$(JAVA)|g' \
                   -e 's|[@]jprogdatadir@|$(jprogdatadir)|g' \
-                  -e 's|[@]SHELL@|$(SHELL)|g'
+                  -e 's|[@]SHELL@|$(SHELL)|g' \
+                  -e 's|[@]PATH_SEPARATOR@|$(PATH_SEPARATOR)|g'
 
 jprog: jprog.sh
        rm -f $@ $@-t
@@ -93,7 +96,7 @@ END
 
 cat > bin/jprog.sh <<'END'
 #!@SHELL@
-CLASSPATH=${jprog_classpath-'@jprogdatadir@'}${CLASSPATH+":$CLASSPATH"}
+CLASSPATH=${jprog_classpath-'@jprogdatadir@'}${CLASSPATH+"@PATH_SEPARATOR@$CLASSPATH"}
 export CLASSPATH
 case $# in
   0) exec @JAVA@ jprog.Main;;
@@ -163,11 +166,11 @@ TESTS_ENVIRONMENT = \
     if test x"$$jprog_doing_installcheck" != x"yes"; then \
         jprog_classpath='$(abs_top_builddir):$(abs_top_srcdir)'; \
         export jprog_classpath; \
-        PATH='$(abs_top_builddir)/bin':$$PATH; \
+        PATH='$(abs_top_builddir)/bin$(PATH_SEPARATOR)'$$PATH; \
         export PATH; \
     else \
         unset jprog_classpath || :; \
-        PATH='$(prefix)/bin':$$PATH; \
+        PATH='$(prefix)/bin$(PATH_SEPARATOR)'$$PATH; \
         export PATH; \
     fi; \
     config_time_prefix='@prefix@'; export config_time_prefix;