Jacob Bachmeyer <jcb62...@gmail.com> writes: > Rainer Orth wrote: >> [...] here's an excerpt from running >> >> env EXPECT=true TCLSH=true /bin/ksh -x >> /vol/gcc/obj/dejagnu/dejagnu-1.6.3-rc3/10-fresh/testsuite/launcher.all/command/bin/dejagnu >> foo -v -v >> >> + test -f >> /vol/gcc/obj/dejagnu/dejagnu-1.6.3-rc3/10-fresh/testsuite/launcher.all >> /command/share/dejagnu/commands/dejagnu.sh >> + expr foo : - >> + 1> /dev/null >> expr: syntax error >> > > Thank you! That identifies the problem. As of commit > c95e2e9b567a1c3ca22b2de4fdcdfe4b99ba2a03, the dejagnu launcher script > now uses the shell "case" builtin for that pattern match instead of > using expr:
Fine, thanks. >> It seems this is no wonder: >> >> expr foo : - >> >> is not in XPG7/POSIX.1 and the autoconf manual explicitly states that >> this is an unportable non-POSIX extension. > > Can you cite exactly where in the Autoconf manual that is mentioned? > The closest that I can find is a recommendation to use `expr X"word" : > 'Xregex'` to handle cases where "word" starts with a dash; here Solaris > 10 is rejecting a case where "word" is "foo". Upon re-checking, I seem to have misread the relevant section, sorry. The fact remains, however, that XPG7 doesn't list that variant on https://pubs.opengroup.org/onlinepubs/9699919799/toc.htm which suggests (together with the behaviour of /usr/xpg6/bin/expr which has been certified for XPG conformance AFAIK) that this usage is an extension. _______________________________________________ Bug-dejagnu mailing list Bug-dejagnu@gnu.org https://lists.gnu.org/mailman/listinfo/bug-dejagnu