diff options
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ChangeLog | 17 | ||||
-rw-r--r-- | vms/descrip.mms | 8 | ||||
-rw-r--r-- | vms/vms-conf.h | 32 | ||||
-rw-r--r-- | vms/vmstest.com | 87 |
4 files changed, 112 insertions, 32 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog index 88a4bf88..62db87e1 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,20 @@ +2011-11-02 Pat Rankin <r.pat.rankin@gmail.com> + + * vms-conf.h (HAVE_SETSID, HAVE_SYS_IOCTL): Add but leave undef'd. + (HAVE_ISWCTYPE, HAVE_ISWLOWER, HAVE_ISWUPPER, HAVE_MBRLEN, + HAVE_MBRTOWC, HAVE_TOWLOWER, HAVE_TOWUPPER, HAVE_WCHAR_H, + HAVE_WCRTOMB, HAVE_WCSCOLL, HAVE_WCTYPE, HAVE_WCTYPE_H, + HAVE_WCTYPE_T): Define as 1 since DEC C supports all these. + + * descrip.mms (replace.obj): Add dependencies for missing_d/*.c. + * vmstest.com (unix_tests): Fix typo in spelling of rtlen01. + +2011-10-30 Pat Rankin <r.pat.rankin@gmail.com> + + * vmstest.com (fpat3, fwtest3, getline5, gsubtst7, gsubtst8, + pty1, rtlen, rtlen01, rtlenmb): New tests. + (posix2008sub): Revised test. + 2011-10-25 Anders Wallin <anders_s_wallin@yahoo.se> * vmstest.com (posix2008sub): Added as specific test in order to diff --git a/vms/descrip.mms b/vms/descrip.mms index 967a312e..40b97eb1 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -48,6 +48,7 @@ # location of various source files, relative to the 'main' directory VMSDIR = [.vms] DOCDIR = [.doc] +MISSNGD = [.missing_d] MAKEFILE = $(VMSDIR)Descrip.MMS # debugging &c !'ccflags' is an escape to allow external compile flags @@ -226,6 +227,13 @@ awkgram.obj : awkgram.c awk.h dfa.obj : dfa.c dfa.h regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h command.obj,debug.obj : cmd.h +replace.obj : replace.c $(MISSNGD)system.c $(MISSNGD)memcmp.c \ + $(MISSNGD)memcpy.c $(MISSNGD)memset.c $(MISSNGD)memmove.c \ + $(MISSNGD)strncasecmp.c $(MISSNGD)strerror.c \ + $(MISSNGD)strftime.c $(MISSNGD)strchr.c $(MISSNGD)strtod.c \ + $(MISSNGD)strtoul.c $(MISSNGD)tzset.c $(MISSNGD)mktime.c \ + $(MISSNGD)snprintf.c $(MISSNGD)getaddrinfo.c $(MISSNGD)usleep.c \ + $(MISSNGD)setenv.c $(MISSNGD)strcoll.c $(MISSNGD)wcmisc.c # bison or yacc required awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c diff --git a/vms/vms-conf.h b/vms/vms-conf.h index cbdc9508..c42118ff 100644 --- a/vms/vms-conf.h +++ b/vms/vms-conf.h @@ -128,13 +128,13 @@ #define HAVE_ISASCII 1 /* Define to 1 if you have the `iswctype' function. */ -#undef HAVE_ISWCTYPE +#define HAVE_ISWCTYPE 1 /* Define to 1 if you have the `iswlower' function. */ -#undef HAVE_ISWLOWER +#define HAVE_ISWLOWER 1 /* Define to 1 if you have the `iswupper' function. */ -#undef HAVE_ISWUPPER +#define HAVE_ISWUPPER 1 /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET @@ -167,10 +167,10 @@ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `mbrlen' function. */ -#undef HAVE_MBRLEN +#define HAVE_MBRLEN 1 /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -#undef HAVE_MBRTOWC +#define HAVE_MBRTOWC 1 /* Define to 1 if you have the <mcheck.h> header file. */ #undef HAVE_MCHECK_H @@ -214,6 +214,9 @@ /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -289,6 +292,9 @@ /* Define to 1 if you have the `system' function. */ #define HAVE_SYSTEM 1 +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H @@ -322,10 +328,10 @@ #undef HAVE_TM_ZONE /* Define to 1 if you have the `towlower' function. */ -#undef HAVE_TOWLOWER +#define HAVE_TOWLOWER 1 /* Define to 1 if you have the `towupper' function. */ -#undef HAVE_TOWUPPER +#define HAVE_TOWUPPER 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ @@ -357,22 +363,22 @@ #define HAVE_VPRINTF 1 /* Define to 1 if you have the <wchar.h> header file. */ -#undef HAVE_WCHAR_H +#define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcrtomb' function. */ -#undef HAVE_WCRTOMB +#define HAVE_WCRTOMB 1 /* Define to 1 if you have the `wcscoll' function. */ -#undef HAVE_WCSCOLL +#define HAVE_WCSCOLL 1 /* Define to 1 if you have the `wctype' function. */ -#undef HAVE_WCTYPE +#define HAVE_WCTYPE 1 /* Define to 1 if you have the <wctype.h> header file. */ -#undef HAVE_WCTYPE_H +#define HAVE_WCTYPE_H 1 /* systems should define this type here */ -#undef HAVE_WCTYPE_T +#define HAVE_WCTYPE_T 1 /* systems should define this type here */ #undef HAVE_WINT_T diff --git a/vms/vmstest.com b/vms/vmstest.com index d4d3d8a9..146053e1 100644 --- a/vms/vmstest.com +++ b/vms/vmstest.com @@ -47,15 +47,17 @@ $ list = "msg addcomma anchgsub argarray arrayparm arrayref" - + " clobber closebad clsflnam compare compare2 concat1" $ gosub list_of_tests $ list = "concat2 concat3 concat4 convfmt datanonl defref" - - + " delargv delarprm delarpm2 delfunc dynlj eofsplit exitval1" - - + " dfastress" - + + " delargv delarprm delarpm2 delfunc dfastress dynlj" - + + " eofsplit exitval1" - + " exitval2 fcall_exit fcall_exit2 fldchg fldchgnf" - + " fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc" - + " fordel forref forsimp fsbs fsspcoln fsrs fstabplus" - - + " funsemnl funsmnam funstack getline getline2 getline3" + + " funsemnl funsmnam funstack getline getline2 getline3" - + + " getline4" $ gosub list_of_tests $ list = "getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" - - + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex" - + + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6" - + + " gsubtst7 gsubtst8 hex" - + " hsprint inputred intest intprec iobug1" - + " leaddig leadnl litoct longsub longwrds"- + " manglprm math membug1 messages minusstr mmap8k" - @@ -87,7 +89,7 @@ $ $unix: $unix_tests: echo "unix_tests..." $ list = "fflush getlnhd localenl pid pipeio1 pipeio2" - - + " poundbang space strftlng" + + " poundbang rtlen rtlen01 space strftlng" $ gosub list_of_tests $ return $ @@ -96,7 +98,8 @@ $gawk_ext: echo "gawk_ext... (gawk.extensions)" $ list = "aadelete1 aadelete2 aarray1 aasort aasorti" - + " argtest arraysort backw badargs beginfile1 binmode1" - + " clos1way delsub devfd devfd1 devfd2 dumpvars exit" - - + " fieldwdth fpat1 fpat2 fpatnull funlen fsfwfs fwtest fwtest2" - + + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen fsfwfs" - + + " fwtest fwtest2 fwtest3" - + " gensub gensub2 getlndir gnuops2 gnuops3 gnureops" - + " icasefs icasers igncdym igncfs ignrcase ignrcas2" $ gosub list_of_tests @@ -104,7 +107,7 @@ $ list = "indirectcall lint lintold lintwarn match1" - + " match2 match3 manyfiles mbprintf3 mbstr1" - + " nastyparm next nondec" - + " nondec2 patsplit posix profile1 procinfs printfbad1" - - + " printfbad2 regx8bit rebuf reint reint2 rsstart1" - + + " printfbad2 pty1 regx8bit rebuf reint reint2 rsstart1" - + " rsstart2 rsstart3 rstest6 shadow sortfor sortu" - + " splitarg4 strtonum strftime switch2" $ gosub list_of_tests @@ -121,7 +124,7 @@ $charset_tests: echo "charset_tests..." $ ! without i18n kit, VMS only supports the C locale $ ! and several of these fail $ list = "asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1" - - + " mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc" + + " mbprintf1 mbprintf2 rebt8b2 rtlenmb sort1 sprintfc" $ gosub list_of_tests $ return $ @@ -194,6 +197,7 @@ $fldchgnf: $fmttest: $fordel: $fpat1: +$fpat3: $fpatnull: $fsfwfs: $fsrs: @@ -201,14 +205,18 @@ $funlen: $funstack: $fwtest: $fwtest2: +$fwtest3: $gensub: $getline3: +$getline4: $getnr2tb: $getnr2tm: $gsubtest: $gsubtst2: $gsubtst4: $gsubtst5: +$gsubtst7: +$gsubtst8: $hex: $icasers: $igncfs: @@ -363,7 +371,8 @@ $ gawk -f printlang.awk $ return $ $poundbang: -$ echo "poundbang: not supported" +$pty1: +$ echo "''test': not supported" $ return $ $messages: echo "messages" @@ -1077,16 +1086,12 @@ $ igncascmp space.ok _space.tmp $ if $status then rm _space.tmp; $ return $ -$posix2008sub: echo "posix2008sub" -$ gawk --posix -f posix2008sub.awk >_posix2008sub.tmp -$ cmp posix2008sub.ok _posix2008sub.tmp -$ if $status then rm _posix2008sub.tmp; -$ return -$ -$printf0: echo "printf0" -$ gawk --posix -f printf0.awk >_printf0.tmp -$ cmp printf0.ok _printf0.tmp -$ if $status then rm _printf0.tmp; +$posix2008sub: +$printf0: +$ echo "''test'" +$ gawk --posix -f 'test'.awk >_'test'.tmp +$ cmp 'test'.ok _'test'.tmp +$ if $status then rm _'test'.tmp; $ return $ $rsnulbig: echo "rsnulbig" @@ -1201,6 +1206,50 @@ $ cmp rsstart3.ok _rsstart3.tmp $ if $status then rm _rsstart3.tmp; $ return $ +$rtlen: +$rtlen01: +$rtlenmb: +$ echo "''test'" +$ if .not.pipeok +$ then echo "Without the PIPE command, ''test' can't be run." +$ On warning then return +$ pipe echo "With PIPE, ''test' will finish quickly." +$ On warning then $ +$ pipeok = 1 +$ endif +$ f = "''test'.ok" +$ if test.eqs."rtlen" .or. test.eqs."rtlenmb" +$ then +$ if test.eqs."rtlenmb" then GAWKLOCALE = "en_US.UTF-8" +$ pipe - + gawk -- "BEGIN {printf ""0\n\n\n1\n\n\n\n\n2\n\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" >_'test'.tmp +$ if test.eqs."rtlenmb" then delet_/Symbol/Local GAWKLOCALE +$ if test.eqs."rtlenmb" then f = "rtlen.ok" +$ else +$ call/Output=_rtlen01.tmp do__rtlen01 +$ ! first test yields 1 instead of 0 due to forced newline +$ gawk -- "FNR==1 {sub(""1"",""0"")}; {print}" _rtlen01.tmp >_rtlen01.too +$ rm _rtlen01.tmp; +$ mv _rtlen01.too _rtlen01.tmp +$ endif +$ cmp 'f' _'test'.tmp +$ if $status then rm _'test'.tmp; +$ return +$ +$do__rtlen01: subroutine +$ gawk = gawk !PIPE won't propagate local symbols from outer procedure +$ pipe - + gawk -- "BEGIN {printf ""0""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ pipe - + gawk -- "BEGIN {printf ""0\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ pipe - + gawk -- "BEGIN {printf ""0\n\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ endsubroutine !do__rtlen01 +$ $nondec2: echo "nondec2" $ gawk --non-decimal-data -v "a=0x1" -f nondec2.awk >_nondec2.tmp $ cmp nondec2.ok _nondec2.tmp |