texlive[61054] Build/source/texk/web2c/hitexdir: adding test for

commits+mruckert at tug.org commits+mruckert at tug.org
Sun Nov 14 17:16:13 CET 2021


Revision: 61054
          http://tug.org/svn/texlive?view=revision&revision=61054
Author:   mruckert
Date:     2021-11-14 17:16:13 +0100 (Sun, 14 Nov 2021)
Log Message:
-----------
adding test for hitex

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/hitexdir/am/hitex.am
    trunk/Build/source/texk/web2c/hitexdir/hiformat.w
    trunk/Build/source/texk/web2c/hitexdir/hilexer.c
    trunk/Build/source/texk/web2c/hitexdir/hilexer.l
    trunk/Build/source/texk/web2c/hitexdir/hiparser.c
    trunk/Build/source/texk/web2c/hitexdir/hiparser.h
    trunk/Build/source/texk/web2c/hitexdir/hiparser.y
    trunk/Build/source/texk/web2c/hitexdir/tests/rule.test

Added Paths:
-----------
    trunk/Build/source/texk/web2c/hitexdir/tests/hello.test
    trunk/Build/source/texk/web2c/hitexdir/tests/hello.tex

Modified: trunk/Build/source/texk/web2c/hitexdir/am/hitex.am
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/am/hitex.am	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/am/hitex.am	2021-11-14 16:16:13 UTC (rev 61054)
@@ -100,9 +100,11 @@
 
 ## HiTeX tests
 #
-hitex_tests = hitexdir/tests/rule.test
+hitex_tests = hitexdir/tests/rule.test\
+	hitexdir/tests/hello.test
 
 hitexdir/tests/rule.log: hitex$(EXEEXT) histretch$(EXEEXT) hishrink$(EXEEXT)
+hitexdir/tests/hello.log: hitex$(EXEEXT) histretch$(EXEEXT)
 
 
 EXTRA_DIST += $(hitex_tests)
@@ -112,5 +114,9 @@
 endif HITEX
 
 ## rule.test
-EXTRA_DIST += tests/rule.tex
+EXTRA_DIST += tests/rule.tex 
 DISTCLEANFILES += rule.log
+
+## hello.test
+EXTRA_DIST += tests/hello.tex 
+DISTCLEANFILES += hello.log

Modified: trunk/Build/source/texk/web2c/hitexdir/hiformat.w
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiformat.w	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hiformat.w	2021-11-14 16:16:13 UTC (rev 61054)
@@ -6834,8 +6834,8 @@
 @
 
 
-Writing the auxiliary files depends on the {\tt -f} and the {\tt -g}
-option.
+Writing the auxiliary files depends on the {\tt -n}, {\tt -f} and {\tt -g}
+options.
 
 @<without {\tt -f} skip writing an existing file@>=
     if ( !option_force && access(file_name,F_OK)==0)
@@ -6939,6 +6939,7 @@
 void hget_section(uint16_t n);
 void hwrite_aux_files(void)
 { int i;
+  if (option_no_aux) return;
   DBG(DBGBASIC|DBGDIR,"Writing %d aux files\n",max_section_no-2);
   for (i=3;i<=max_section_no;i++)
   { FILE *f;
@@ -6945,7 +6946,6 @@
     char * file_name=dir[i].file_name;
     int file_name_length=0;
 
-    
     @<without {\tt -g} compute a local |file_name|@>@;
     @<without {\tt -f} skip writing an existing file@>@;
     @<make sure the path in |file_name| exists@>@;
@@ -8524,6 +8524,8 @@
   "\t --version\t display the HINT version\n"@/
   "\t -o file\t specify an output file name\n"@/
   "\t -g     \t assume global names for auxiliary files\n"@/
+  "\t -f     \t force overwriting auxiliary files\n"@/
+  "\t -n     \t do not write auxiliary files\n"@/
   "\t -l     \t redirect stderr to a log file\n"@/
   "\t -u     \t enable writing utf8 character codes\n"@/
   "\t -x     \t enable writing hexadecimal character codes\n"@/
@@ -8580,6 +8582,7 @@
 int option_hex=false;
 int option_force=false;
 int option_global=false;
+int option_no_aux=false;
 int option_compress=false;
 char *stem_name=NULL;
 int stem_length=0;
@@ -8634,6 +8637,7 @@
         case 'x': option_hex=true;@+break;
         case 'f': option_force=true; @+break;
         case 'g': option_global=true; @+break;
+        case 'n': option_no_aux=true; @+break;
         case 'c': option_compress=true; @+break;
         case 'd': @/
           argv++; if (*argv==NULL) goto explain_usage;

Modified: trunk/Build/source/texk/web2c/hitexdir/hilexer.c
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hilexer.c	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hilexer.c	2021-11-14 16:16:13 UTC (rev 61054)
@@ -844,7 +844,7 @@
 #line 1 "lexer.l"
 #line 2 "lexer.l"
 	/*509:*/
-	#line 10171 "format.w"
+	#line 10175 "format.w"
 	
 #include "hibasetypes.h"
 #include "hierror.h"
@@ -980,7 +980,7 @@
 	}
 	/*:61*/
 int yywrap(void){
-	#line 10182 "format.w"
+	#line 10186 "format.w"
 	return 1;}
 #ifdef _MSC_VER
 #pragma  warning( disable : 4267)

Modified: trunk/Build/source/texk/web2c/hitexdir/hilexer.l
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hilexer.l	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hilexer.l	2021-11-14 16:16:13 UTC (rev 61054)
@@ -1,6 +1,6 @@
 	/*509:*/
 %{
-	#line 10171 "format.w"
+	#line 10175 "format.w"
 	
 #include "hibasetypes.h"
 #include "hierror.h"
@@ -136,7 +136,7 @@
 	}
 	/*:61*/
 int yywrap(void){
-	#line 10182 "format.w"
+	#line 10186 "format.w"
 	return 1;}
 #ifdef _MSC_VER
 #pragma  warning( disable : 4267)

Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.c
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.c	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.c	2021-11-14 16:16:13 UTC (rev 61054)
@@ -69,7 +69,7 @@
 /* First part of user prologue.  */
 #line 2 "parser.y"
 
-	#line 10212 "format.w"
+	#line 10216 "format.w"
 	
 #include "hibasetypes.h"
 #include <string.h>
@@ -132,7 +132,7 @@
 extern int yylineno;
 int yyerror(const char*msg)
 {
-	#line 8799 "format.w"
+	#line 8803 "format.w"
 	QUIT(" in line %d %s",yylineno,msg);
 	return 0;
 	}

Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.h
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.h	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.h	2021-11-14 16:16:13 UTC (rev 61054)
@@ -147,7 +147,7 @@
 {
 #line 79 "parser.y"
 
-	#line 10237 "format.w"
+	#line 10241 "format.w"
 	uint32_t u;  int32_t i;  char *s;  float64_t f;  glyph_t c;
 	dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
 	rule_t r;glue_t g;image_t x;

Modified: trunk/Build/source/texk/web2c/hitexdir/hiparser.y
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/hiparser.y	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/hiparser.y	2021-11-14 16:16:13 UTC (rev 61054)
@@ -1,6 +1,6 @@
 	/*510:*/
 %{
-	#line 10212 "format.w"
+	#line 10216 "format.w"
 	
 #include "hibasetypes.h"
 #include <string.h>
@@ -63,7 +63,7 @@
 extern int yylineno;
 int yyerror(const char*msg)
 {
-	#line 8799 "format.w"
+	#line 8803 "format.w"
 	QUIT(" in line %d %s",yylineno,msg);
 	return 0;
 	}
@@ -77,7 +77,7 @@
 
 
 %union {
-	#line 10237 "format.w"
+	#line 10241 "format.w"
 	uint32_t u;  int32_t i;  char *s;  float64_t f;  glyph_t c;
 	dimen_t d;stretch_t st;xdimen_t xd;kern_t kt;
 	rule_t r;glue_t g;image_t x;

Added: trunk/Build/source/texk/web2c/hitexdir/tests/hello.test
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/tests/hello.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/hitexdir/tests/hello.test	2021-11-14 16:16:13 UTC (rev 61054)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $Id: rule.test $
+# Public domain. Originally written by Martin Ruckert
+# Basic check that rule.tex can be hitexed stretched and shrinked.
+
+LC_ALL=C; export LC_ALL;  LANGUAGE=C; export LANGUAGE
+
+TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
+TEXINPUTS=$srcdir/hitexdir/tests; export TEXINPUTS
+TFMFONTS=$srcdir/tests; export TFMFONTS
+#PKFONTS=$srcdir/tests; export PKFONTS
+T1FONTS=$srcdir/tests; export T1FONTS
+OUTDIR=./hitexdir/tests
+
+./hitex -ini -interaction=nonstopmode -output-directory=$OUTDIR hello.tex || exit $?
+./histretch -n $OUTDIR/hello.hnt || exit $?
+
+if grep -q "<section 3 '../../../texk/web2c/tests/cmr10.tfm'>" $OUTDIR/hello.HINT
+then
+    : # OK
+else
+    echo "hello.HINT does not contain the propper .tfm file" >&2
+    exit 1
+fi
+
+exit 0
+


Property changes on: trunk/Build/source/texk/web2c/hitexdir/tests/hello.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/hitexdir/tests/hello.tex
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/tests/hello.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/hitexdir/tests/hello.tex	2021-11-14 16:16:13 UTC (rev 61054)
@@ -0,0 +1,11 @@
+% $Id: rule.tex $
+% Public domain. Test file for generating a single rule
+% Originally written 2021 Martin Ruckert
+
+\catcode`\{=1 \catcode`\}=2 % can run under -ini
+\font\tenrm=cmr10 %
+\tenrm Hello world!
+\vfill
+
+\end
+


Property changes on: trunk/Build/source/texk/web2c/hitexdir/tests/hello.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/hitexdir/tests/rule.test
===================================================================
--- trunk/Build/source/texk/web2c/hitexdir/tests/rule.test	2021-11-14 13:59:47 UTC (rev 61053)
+++ trunk/Build/source/texk/web2c/hitexdir/tests/rule.test	2021-11-14 16:16:13 UTC (rev 61054)
@@ -1,4 +1,4 @@
-#! /bin/sh -vx
+#!/bin/sh
 # $Id: rule.test $
 # Public domain. Originally written by Martin Ruckert
 # Basic check that rule.tex can be hitexed stretched and shrinked.
@@ -7,25 +7,26 @@
 
 TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
 TEXINPUTS=$srcdir/hitexdir/tests; export TEXINPUTS
+OUTDIR=./hitexdir/tests
 
-./hitex -ini --interaction=nonstopmode rule.tex || exit $?
-./histretch rule.hnt || exit $?
-./hishrink -o rule.out.hnt rule.HINT || exit $?
-./histretch rule.out.hnt || exit $?
+./hitex -ini --interaction=nonstopmode -output-directory=$OUTDIR rule.tex || exit $?
+./histretch $OUTDIR/rule.hnt || exit $?
+./hishrink -o $OUTDIR/rule.out.hnt $OUTDIR/rule.HINT || exit $?
+./histretch $OUTDIR/rule.out.hnt || exit $?
 
-if grep -q "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" rule.HINT
+if grep -q "<rule 0x48.451Ept 1pt 0x1C.73E7pt>" $OUTDIR/rule.HINT
 then
     : # OK
 else
-    echo "rule.HINT does not contain the propper rule"
+    echo "rule.HINT does not contain the propper rule" >&2
     exit 1
 fi
 
-if diff -q -w rule.out.HINT rule.HINT
+if diff -q -w $OUTDIR/rule.out.HINT $OUTDIR/rule.HINT
 then
     : #OK
 else
-    echo "rule.out.HINT and rule.HINT differ"
+    echo "rule.out.HINT and rule.HINT differ" >&2
     exit 1
 fi
 



More information about the tex-live-commits mailing list.