Skip to content
Browse files

Standardized licensing. Everything under my control is MIT, pcrs is

LGPL, and rel2abs is some sort of weird BSD variant.
  • Loading branch information...
1 parent c310c70 commit 242098e6f5469ca5efe0a8267cac4bbaca72ab2e Scott Bronson committed with Scott Bronson Dec 18, 2005
Showing with 816 additions and 22 deletions.
  1. +3 −0 CHANGES
  2. +14 −10 Makefile
  3. +1 −0 TODO
  4. +2 −1 compare.c
  5. +3 −1 compare.h
  6. +4 −3 curdir.c
  7. +2 −1 curdir.h
  8. +2 −1 main.c
  9. +2 −0 qscandir.h
  10. +11 −0 rusage.c
  11. +437 −0 stscan.c
  12. +1 −1 stscan.re
  13. +1 −1 test.c
  14. +1 −0 test.h
  15. +63 −0 test/01-testfile/10-DumpScript.test
  16. +258 −0 tfscan.c
  17. +1 −1 tfscan.re
  18. +3 −1 tmlib.sh
  19. +5 −0 tmtest.conf
  20. +2 −1 vars.c
View
3 CHANGES
@@ -1,3 +1,6 @@
+- Standardized licensing: everything under my control is MIT, package is LGPL.
+- When installing locally, it's ~/.tmlib.sh instead of ~/share/tmtest/tmlib.sh
+- Bump to 0.92
- install now installs config files too.
- Added the --config option to override default config files.
- Added timing information to test summary. Disable with new -q option.
View
24 Makefile
@@ -11,16 +11,20 @@ VERSION=0.92
#prefix=/usr
prefix=$(HOME)
+
bindir=$(prefix)/bin
-libdir=$(prefix)/share/tmtest
-stdlib=$(libdir)/tmlib.sh
+lib_src=tmlib.sh
ifeq ($(prefix), $(HOME))
- global_conf=$(HOME)/.tmtestrc
- conf_file=tmtestrc
+ libdir=$(prefix)
+ stdlib=$(libdir)/.tmlib.sh
+ conf_src=tmtestrc
+ conf_dst=$(HOME)/.tmtestrc
else
- global_conf=/etc/tmtest.conf
- conf_file=tmtestetc
+ libdir=$(prefix)/share/tmtest
+ stdlib=$(libdir)/tmlib.sh
+ conf_src=tmtestetc
+ conf_dst=/etc/tmtest.conf
endif
@@ -64,10 +68,10 @@ install: tmtest
install -d -m755 $(bindir)
install tmtest $(bindir)
install -d -m755 $(libdir)
- install tmlib.sh $(libdir)
- install $(conf_file) $(global_conf)
- perl -pi -e 's/USER/$(shell whoami)/g' $(global_conf)
- perl -pi -e 's:STDLIB:$(stdlib):g' $(global_conf)
+ install tmlib.sh $(stdlib)
+ install $(conf_src) $(conf_dst)
+ perl -pi -e 's/USER/$(shell whoami)/g' $(conf_dst)
+ perl -pi -e 's:STDLIB:$(stdlib):g' $(conf_dst)
uninstall: tmtest
rm $(bindir)/tmtest
View
1 TODO
@@ -6,6 +6,7 @@
// "tmtest -c /a/b/cc /a/t/u/t.test", we will look for config files
// in /a/t/tmtest.conf and /a/t/u/tmtest.conf.
+- merge tmtestlib and tmtestrc. They're now basically the same file.
- Add STDOUT: trimws and STDERR: trimws - to trim whitespace from
the front of each output line.
- It's silly to have the utilities all in separate files.
View
3 compare.c
@@ -2,7 +2,8 @@
* Scott Bronson
* 31 Dec 2004
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is distrubuted under the MIT License
+ * See http://en.wikipedia.org/wiki/MIT_License for more.
*
*
* File comparison.
View
4 compare.h
@@ -2,7 +2,9 @@
* Scott Bronson
* 31 Dec 2004
*
- * File comparison.
+ * File comparison prototypes.
+ *
+ * See compare.c for license.
*/
#include "pcrs.h"
View
7 curdir.c
@@ -1,10 +1,11 @@
/* curdir.c
* 29 Jan 2005
* Copyright (C) 2005 Scott Bronson
- *
- * Some simple path handling routines
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is distrubuted under the MIT License
+ * See http://en.wikipedia.org/wiki/MIT_License for more.
+ *
+ * Some simple path handling routines
*
* Unfortunately this file got hacked to shreds when tmtest was
* made to run with /tmp as the constant cwd. It's pretty
View
3 curdir.h
@@ -2,7 +2,8 @@
* 29 Jan 2005
* Copyright (C) 2005 Scott Bronson
*
- * Some simple path handling routines
+ * Some simple path handling routines.
+ * See curdir.c for license.
*/
View
3 main.c
@@ -4,7 +4,8 @@
*
* The main routine for tmtest.
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is distrubuted under the MIT License
+ * See http://en.wikipedia.org/wiki/MIT_License for more.
*/
View
2 qscandir.h
@@ -1,6 +1,8 @@
/* qscandir.h
* Scott Bronson
* 29 Dec 2004
+ *
+ * This file is in the public domain.
*/
struct dirent;
View
11 rusage.c
@@ -1,3 +1,14 @@
+/* rusage.c
+ * Scott Bronson
+ * 2005
+ *
+ * This file is covered by the MIT License.
+ *
+ * This function is split off from test.c because it includes
+ * some fairly non-portable calls. test.c should be totally
+ * portable.
+ */
+
#include <stdio.h>
#include <string.h>
#include <errno.h>
View
437 stscan.c
@@ -0,0 +1,437 @@
+/* Generated by re2c 0.5 on Sun Dec 18 12:25:01 2005 */
+
+/* stscan.re
+ * Scott Bronson
+ *
+ * This file is covered by the MIT license.
+ *
+ * Scanner for status files files.
+ * This file needs to be processed by re2c, http://re2c.org
+ */
+
+#include "stscan.h"
+
+
+/* This scanner scans lines. When it finds a line that begins
+ * with a recognized token, it returns that token with the text
+ * of the entire line. Otherwise, it returns stGARBAGE.
+ *
+ * Note that this scanner only returns complete lines. If the file
+ * doesn't end with a newline, then the last line will be lost.
+ * I think.
+ */
+
+int stscan_start(scanstate *ss)
+{
+ scanner_enter(ss);
+ inc_line(ss);
+
+{
+ YYCTYPE yych;
+ unsigned int yyaccept;
+ goto yy0;
+yy1: ++YYCURSOR;
+yy0:
+ if((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\n': goto yy10;
+ case 'A': goto yy7;
+ case 'C': goto yy3;
+ case 'D': goto yy6;
+ case 'P': goto yy4;
+ case 'R': goto yy5;
+ case 'S': goto yy2;
+ default: goto yy8;
+ }
+yy2: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy77;
+ default: goto yy9;
+ }
+yy3: yych = *++YYCURSOR;
+ switch(yych){
+ case 'O': goto yy67;
+ default: goto yy9;
+ }
+yy4: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy55;
+ default: goto yy9;
+ }
+yy5: yych = *++YYCURSOR;
+ switch(yych){
+ case 'U': goto yy44;
+ default: goto yy9;
+ }
+yy6: yych = *++YYCURSOR;
+ switch(yych){
+ case 'I': goto yy23;
+ case 'O': goto yy24;
+ default: goto yy9;
+ }
+yy7: yych = *++YYCURSOR;
+ switch(yych){
+ case 'B': goto yy12;
+ default: goto yy9;
+ }
+yy8: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy9;
+yy9: switch(yych){
+ case '\n': goto yy10;
+ default: goto yy8;
+ }
+yy10: yych = *++YYCURSOR;
+ goto yy11;
+yy11:
+
+ { return stGARBAGE; }
+yy12: yych = *++YYCURSOR;
+ switch(yych){
+ case 'O': goto yy13;
+ default: goto yy9;
+ }
+yy13: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy14;
+ default: goto yy9;
+ }
+yy14: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy15;
+ default: goto yy9;
+ }
+yy15: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy16;
+ default: goto yy9;
+ }
+yy16: yych = *++YYCURSOR;
+ switch(yych){
+ case 'D': goto yy17;
+ default: goto yy9;
+ }
+yy17: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy18;
+yy18: switch(yych){
+ case '\t': case ' ': goto yy17;
+ case '\n': goto yy10;
+ case ':': goto yy19;
+ default: goto yy8;
+ }
+yy19: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy20;
+yy20: switch(yych){
+ case '\n': goto yy21;
+ default: goto yy19;
+ }
+yy21: yych = *++YYCURSOR;
+ goto yy22;
+yy22:
+
+ { return stABORTED; }
+yy23: yych = *++YYCURSOR;
+ switch(yych){
+ case 'S': goto yy33;
+ default: goto yy9;
+ }
+yy24: yych = *++YYCURSOR;
+ switch(yych){
+ case 'N': goto yy25;
+ default: goto yy9;
+ }
+yy25: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy26;
+ default: goto yy9;
+ }
+yy26: yych = *++YYCURSOR;
+ switch(yych){
+ case '\t': case ' ': goto yy29;
+ case '\n': goto yy27;
+ default: goto yy8;
+ }
+yy27: yych = *++YYCURSOR;
+ goto yy28;
+yy28:
+
+ { return stDONE; }
+yy29: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy30;
+yy30: switch(yych){
+ case '\t': case ' ': goto yy29;
+ case '\n': goto yy27;
+ default: goto yy31;
+ }
+yy31: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy32;
+yy32: switch(yych){
+ case '\n': goto yy27;
+ default: goto yy31;
+ }
+yy33: yych = *++YYCURSOR;
+ switch(yych){
+ case 'A': goto yy34;
+ default: goto yy9;
+ }
+yy34: yych = *++YYCURSOR;
+ switch(yych){
+ case 'B': goto yy35;
+ default: goto yy9;
+ }
+yy35: yych = *++YYCURSOR;
+ switch(yych){
+ case 'L': goto yy36;
+ default: goto yy9;
+ }
+yy36: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy37;
+ default: goto yy9;
+ }
+yy37: yych = *++YYCURSOR;
+ switch(yych){
+ case 'D': goto yy38;
+ default: goto yy9;
+ }
+yy38: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy39;
+yy39: switch(yych){
+ case '\t': case ' ': goto yy38;
+ case '\n': goto yy10;
+ case ':': goto yy40;
+ default: goto yy8;
+ }
+yy40: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy41;
+yy41: switch(yych){
+ case '\n': goto yy42;
+ default: goto yy40;
+ }
+yy42: yych = *++YYCURSOR;
+ goto yy43;
+yy43:
+
+ { return stDISABLED; }
+yy44: yych = *++YYCURSOR;
+ switch(yych){
+ case 'N': goto yy45;
+ default: goto yy9;
+ }
+yy45: yych = *++YYCURSOR;
+ switch(yych){
+ case 'N': goto yy46;
+ default: goto yy9;
+ }
+yy46: yych = *++YYCURSOR;
+ switch(yych){
+ case 'I': goto yy47;
+ default: goto yy9;
+ }
+yy47: yych = *++YYCURSOR;
+ switch(yych){
+ case 'N': goto yy48;
+ default: goto yy9;
+ }
+yy48: yych = *++YYCURSOR;
+ switch(yych){
+ case 'G': goto yy49;
+ default: goto yy9;
+ }
+yy49: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy50;
+yy50: switch(yych){
+ case '\t': case ' ': goto yy49;
+ case '\n': goto yy10;
+ case ':': goto yy51;
+ default: goto yy8;
+ }
+yy51: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy52;
+yy52: switch(yych){
+ case '\n': goto yy53;
+ default: goto yy51;
+ }
+yy53: yych = *++YYCURSOR;
+ goto yy54;
+yy54:
+
+ { return stRUNNING; }
+yy55: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy56;
+ default: goto yy9;
+ }
+yy56: yych = *++YYCURSOR;
+ switch(yych){
+ case 'P': goto yy57;
+ default: goto yy9;
+ }
+yy57: yych = *++YYCURSOR;
+ switch(yych){
+ case 'A': goto yy58;
+ default: goto yy9;
+ }
+yy58: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy59;
+ default: goto yy9;
+ }
+yy59: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy60;
+ default: goto yy9;
+ }
+yy60: yych = *++YYCURSOR;
+ switch(yych){
+ case '\t': case ' ': goto yy63;
+ case '\n': goto yy61;
+ default: goto yy8;
+ }
+yy61: yych = *++YYCURSOR;
+ goto yy62;
+yy62:
+
+ { return stPREPARE; }
+yy63: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy64;
+yy64: switch(yych){
+ case '\t': case ' ': goto yy63;
+ case '\n': goto yy61;
+ default: goto yy65;
+ }
+yy65: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy66;
+yy66: switch(yych){
+ case '\n': goto yy61;
+ default: goto yy65;
+ }
+yy67: yych = *++YYCURSOR;
+ switch(yych){
+ case 'N': goto yy68;
+ default: goto yy9;
+ }
+yy68: yych = *++YYCURSOR;
+ switch(yych){
+ case 'F': goto yy69;
+ default: goto yy9;
+ }
+yy69: yych = *++YYCURSOR;
+ switch(yych){
+ case 'I': goto yy70;
+ default: goto yy9;
+ }
+yy70: yych = *++YYCURSOR;
+ switch(yych){
+ case 'G': goto yy71;
+ default: goto yy9;
+ }
+yy71: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy72;
+yy72: switch(yych){
+ case '\t': case ' ': goto yy71;
+ case '\n': goto yy10;
+ case ':': goto yy73;
+ default: goto yy8;
+ }
+yy73: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy74;
+yy74: switch(yych){
+ case '\n': goto yy75;
+ default: goto yy73;
+ }
+yy75: yych = *++YYCURSOR;
+ goto yy76;
+yy76:
+
+ { return stCONFIG; }
+yy77: yych = *++YYCURSOR;
+ switch(yych){
+ case 'A': goto yy78;
+ default: goto yy9;
+ }
+yy78: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy79;
+ default: goto yy9;
+ }
+yy79: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy80;
+ default: goto yy9;
+ }
+yy80: yych = *++YYCURSOR;
+ switch(yych){
+ case '\t': case ' ': goto yy83;
+ case '\n': goto yy81;
+ default: goto yy8;
+ }
+yy81: yych = *++YYCURSOR;
+ goto yy82;
+yy82:
+
+ { return stSTART; }
+yy83: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy84;
+yy84: switch(yych){
+ case '\t': case ' ': goto yy83;
+ case '\n': goto yy81;
+ default: goto yy85;
+ }
+yy85: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy86;
+yy86: switch(yych){
+ case '\n': goto yy81;
+ default: goto yy85;
+ }
+}
+
+
+}
+
+
+/** Prepares the given scanner to scan a status file.
+ *
+ * @param ss the scanstate to attach to. Passing NULL is safely ignored.
+ * @returns ss. Always. This routine makes no calls that can fail.
+ */
+
+scanstate* stscan_attach(scanstate *ss)
+{
+ if(ss) {
+ ss->state = stscan_start;
+ }
+
+ return ss;
+}
+
View
2 stscan.re
@@ -1,7 +1,7 @@
/* stscan.re
* Scott Bronson
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is covered by the MIT license.
*
* Scanner for status files files.
* This file needs to be processed by re2c, http://re2c.org
View
2 test.c
@@ -4,7 +4,7 @@
*
* Contains the routines to check/diff/etc test output.
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is covered by the MIT license.
*/
View
1 test.h
@@ -3,6 +3,7 @@
* 29 Dec 2004
*
* All the data needed to run a test and print the results.
+ * This file is covered by the MIT License.
*/
#include "pcrs.h"
View
63 test/01-testfile/10-DumpScript.test
@@ -0,0 +1,63 @@
+AUTHOR='Scott Bronson'
+DATE='2005-12-14'
+
+# Ensures that the dumpscript is what we expect.
+# This is just so we don't surprise ourselves... Any time you modify
+# template.sh, you should expect test to fial.
+
+tmtest $args --dump-script - <<-EOL
+THE-SCRIPT THE-SCRIPT THE-SCRIPT 1
+THE-SCRIPT THE-SCRIPT THE-SCRIPT 2
+THE-SCRIPT THE-SCRIPT THE-SCRIPT 3
+THE-SCRIPT THE-SCRIPT THE-SCRIPT 4
+EOL
+
+MODIFY: s/DATE='.*'/Date='BLAH BLAH'/
+ s/^(.)/ $1/
+
+STDOUT:
+ echo START >&7
+
+ ABORT () { echo "ABORTED: $*" >&7; exit 0; }
+ ABORT: () { ABORT $*; }
+
+ ATEXIT () { echo "ATEXIT: $*" >&7; }
+ ATEXIT: () { ATEXIT $*; }
+
+ DISABLED () { echo "DISABLED: $*" >&7; exit 0; }
+ DISABLED: () { DISABLED $*; }
+ DISABLE () { DISABLED $*; }
+ DISABLE: () { DISABLED $*; }
+
+ AUTHOR='UNKNOWN'
+ Date='BLAH BLAH'
+ TESTDIR='/tmp'
+ TESTFILE='/tmp/-'
+
+
+
+ echo PREPARE >&7
+
+ STDOUT () { exit 0; }
+ STDOUT: () { exit 0; }
+ STDERR () { exit 0; }
+ STDERR: () { exit 0; }
+ RESULT () { exit 0; }
+ RESULT: () { exit 0; }
+ MODIFY () { exit 0; }
+ MODIFY: () { exit 0; }
+
+ echo 'RUNNING: /tmp/-' >&7
+ MYDIR='/tmp'
+ MYFILE='/tmp/-'
+ exec >&3 2>&5
+ exec 3>&-
+ exec 5>&-
+ LINENO=0
+ THE-SCRIPT THE-SCRIPT THE-SCRIPT 1
+ THE-SCRIPT THE-SCRIPT THE-SCRIPT 2
+ THE-SCRIPT THE-SCRIPT THE-SCRIPT 3
+ THE-SCRIPT THE-SCRIPT THE-SCRIPT 4
+
+
+ echo DONE >&7
View
258 tfscan.c
@@ -0,0 +1,258 @@
+/* Generated by re2c 0.5 on Sun Dec 18 12:25:00 2005 */
+
+/* tfscan.re
+ * Scott Bronson
+ * 30 Dec 2004
+ *
+ * Scanner for test files.
+ * This file needs to be processed by re2c, http://re2c.org
+ *
+ * This file is covered by the MIT License.
+ */
+
+#include "tfscan.h"
+
+
+#define START(x) (ss->scanref=(void*)(x))
+
+
+/* This scanner scans lines. When it finds a line that begins
+ * with a new section, it returns the token name of that section
+ * with the exNEW flag turned on. After that, it returns each
+ * line in the section with the token's identifier. Then, when it
+ * finds a new section, you get a exNEW+TOKEN of the new section.
+ */
+
+int tfscan_start(scanstate *ss)
+{
+ scanner_enter(ss);
+ inc_line(ss);
+
+{
+ YYCTYPE yych;
+ unsigned int yyaccept;
+ goto yy0;
+yy1: ++YYCURSOR;
+yy0:
+ if((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\n': goto yy7;
+ case 'M': goto yy4;
+ case 'R': goto yy3;
+ case 'S': goto yy2;
+ default: goto yy5;
+ }
+yy2: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy29;
+ default: goto yy6;
+ }
+yy3: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy19;
+ default: goto yy6;
+ }
+yy4: yych = *++YYCURSOR;
+ switch(yych){
+ case 'O': goto yy9;
+ default: goto yy6;
+ }
+yy5: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy6;
+yy6: switch(yych){
+ case '\n': goto yy7;
+ default: goto yy5;
+ }
+yy7: yych = *++YYCURSOR;
+ goto yy8;
+yy8:
+
+ { return (int)ss->scanref; }
+yy9: yych = *++YYCURSOR;
+ switch(yych){
+ case 'D': goto yy10;
+ default: goto yy6;
+ }
+yy10: yych = *++YYCURSOR;
+ switch(yych){
+ case 'I': goto yy11;
+ default: goto yy6;
+ }
+yy11: yych = *++YYCURSOR;
+ switch(yych){
+ case 'F': goto yy12;
+ default: goto yy6;
+ }
+yy12: yych = *++YYCURSOR;
+ switch(yych){
+ case 'Y': goto yy13;
+ default: goto yy6;
+ }
+yy13: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy14;
+yy14: switch(yych){
+ case '\t': case ' ': goto yy13;
+ case '\n': goto yy7;
+ case ':': goto yy15;
+ default: goto yy5;
+ }
+yy15: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy16;
+yy16: switch(yych){
+ case '\n': goto yy17;
+ default: goto yy15;
+ }
+yy17: yych = *++YYCURSOR;
+ goto yy18;
+yy18:
+
+ { START(exMODIFY); return exNEW|exMODIFY; }
+yy19: yych = *++YYCURSOR;
+ switch(yych){
+ case 'S': goto yy20;
+ default: goto yy6;
+ }
+yy20: yych = *++YYCURSOR;
+ switch(yych){
+ case 'U': goto yy21;
+ default: goto yy6;
+ }
+yy21: yych = *++YYCURSOR;
+ switch(yych){
+ case 'L': goto yy22;
+ default: goto yy6;
+ }
+yy22: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy23;
+ default: goto yy6;
+ }
+yy23: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy24;
+yy24: switch(yych){
+ case '\t': case ' ': goto yy23;
+ case '\n': goto yy7;
+ case ':': goto yy25;
+ default: goto yy5;
+ }
+yy25: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy26;
+yy26: switch(yych){
+ case '\n': goto yy27;
+ default: goto yy25;
+ }
+yy27: yych = *++YYCURSOR;
+ goto yy28;
+yy28:
+
+ { START(exRESULT); return exNEW|exRESULT; }
+yy29: yych = *++YYCURSOR;
+ switch(yych){
+ case 'D': goto yy30;
+ default: goto yy6;
+ }
+yy30: yych = *++YYCURSOR;
+ switch(yych){
+ case 'E': goto yy31;
+ case 'O': goto yy32;
+ default: goto yy6;
+ }
+yy31: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy40;
+ default: goto yy6;
+ }
+yy32: yych = *++YYCURSOR;
+ switch(yych){
+ case 'U': goto yy33;
+ default: goto yy6;
+ }
+yy33: yych = *++YYCURSOR;
+ switch(yych){
+ case 'T': goto yy34;
+ default: goto yy6;
+ }
+yy34: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy35;
+yy35: switch(yych){
+ case '\t': case ' ': goto yy34;
+ case '\n': goto yy7;
+ case ':': goto yy36;
+ default: goto yy5;
+ }
+yy36: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy37;
+yy37: switch(yych){
+ case '\n': goto yy38;
+ default: goto yy36;
+ }
+yy38: yych = *++YYCURSOR;
+ goto yy39;
+yy39:
+
+ { START(exSTDOUT); return exNEW|exSTDOUT; }
+yy40: yych = *++YYCURSOR;
+ switch(yych){
+ case 'R': goto yy41;
+ default: goto yy6;
+ }
+yy41: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy42;
+yy42: switch(yych){
+ case '\t': case ' ': goto yy41;
+ case '\n': goto yy7;
+ case ':': goto yy43;
+ default: goto yy5;
+ }
+yy43: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ goto yy44;
+yy44: switch(yych){
+ case '\n': goto yy45;
+ default: goto yy43;
+ }
+yy45: yych = *++YYCURSOR;
+ goto yy46;
+yy46:
+
+ { START(exSTDERR); return exNEW|exSTDERR; }
+}
+
+
+}
+
+
+/** Prepares the given scanner to scan a testfile.
+ *
+ * @param ss the scanstate to attach to. Passing NULL is safely ignored.
+ * @returns ss. Always. This routine makes no calls that can fail.
+ */
+
+scanstate* tfscan_attach(scanstate *ss)
+{
+ if(ss) {
+ START(exCOMMAND);
+ ss->state = tfscan_start;
+ }
+
+ return ss;
+}
+
View
2 tfscan.re
@@ -5,7 +5,7 @@
* Scanner for test files.
* This file needs to be processed by re2c, http://re2c.org
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * This file is covered by the MIT License.
*/
#include "tfscan.h"
View
4 tmlib.sh
@@ -1,6 +1,8 @@
# tmlib.sh
-# This file contains utilities useful for writing testfiles.
+# Utilities useful for writing tmtest testfiles.
+# This file is covered by the MIT License.
+
# TODO: should these routines be prefixed by "TM"?
View
5 tmtest.conf
@@ -3,6 +3,11 @@
# 31 Dec 2004
+# This file tells how to run tests on tmtest itself.
+# See tmtestetc or tmtestrc for examples of globally-installed
+# configuration files.
+
+
# This can be a little confusing because one copy of tmtest runs another
# copy and checks its output. We'll call the executable doing the testing
# the superexec, and the program being tested the subexec.
View
3 vars.c
@@ -2,7 +2,8 @@
* Scott Bronson
* 29 Dec 2004
*
- * This software is distributed under the LGPL. See COPYING for more.
+ * Interpolates $(VARS) in the test template (template.sh).
+ * This file is covered by the MIT License.
*/
#include <stdio.h>

0 comments on commit 242098e

Please sign in to comment.
Something went wrong with that request. Please try again.