diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/cals/test/colsep |
Initial commit
Diffstat (limited to 'macros/latex/contrib/cals/test/colsep')
4 files changed, 265 insertions, 0 deletions
diff --git a/macros/latex/contrib/cals/test/colsep/test_10_outone.chk b/macros/latex/contrib/cals/test/colsep/test_10_outone.chk new file mode 100644 index 0000000000..40befd43b3 --- /dev/null +++ b/macros/latex/contrib/cals/test/colsep/test_10_outone.chk @@ -0,0 +1,62 @@ +% +% test1 +% +> \cals@lastLeftWidth=macro: +->0pt. +> \boxXX= +\hbox(0.0+0.0)x0.0 +% +% test2 +% +> \cals@lastLeftWidth=macro: +->4pt. +> \boxXX= +\hbox(0.0+0.0)x50.0 +.\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG} +.\rule(*+0.0)x50.0 +.\pdfcolorstack 0 pop +.\glue -50.0 +.\glue -2.0 +.\rule(*+0.0)x4.0 +.\glue -2.0 +.\glue 50.0 +% +% test3 +% +> \cals@lastLeftWidth=macro: +->2pt. +> \boxXX= +\hbox(0.0+0.0)x100.0 +.\pdfcolorstack 0 push {0 1 0 rg 0 1 0 RG} +.\rule(*+0.0)x100.0 +.\pdfcolorstack 0 pop +.\glue -100.0 +.\glue -1.0 +.\rule(*+0.0)x2.0 +.\glue -1.0 +.\glue 100.0 +% +% test4 +% +> \boxXX= +\hbox(0.0+0.0)x0.0 +.\glue -1.0 +.\rule(*+0.0)x2.0 +.\glue -1.0 +% +% test5 +% +> \boxXX= +\hbox(0.0+0.0)x300.0 +.\glue 300.0 +% +% test6 +% +> \boxXX= +\hbox(0.0+0.0)x0.0 +.\glue 0.0 +% +% test7 +% +> \boxXX= +\hbox(0.0+0.0)x0.0 diff --git a/macros/latex/contrib/cals/test/colsep/test_10_outone.tex b/macros/latex/contrib/cals/test/colsep/test_10_outone.tex new file mode 100644 index 0000000000..fec00899ac --- /dev/null +++ b/macros/latex/contrib/cals/test/colsep/test_10_outone.tex @@ -0,0 +1,57 @@ +% +% +\def\cals@cs@width{2pt} +\def\cals@bgcolor{green} + +% +% cals@cs@outone: +% #1: cell width +% #2: left border width +% #3: background color +% +% +% test1: everything disabled +% +\setbox0=\hbox{\cals@cs@outOne\relax{0pt}{}% +\show\cals@lastLeftWidth +} +\showbox0 + +% +% test2: everything specified +% +\setbox0=\hbox{\cals@cs@outOne{50pt}{4pt}{red}% +\show\cals@lastLeftWidth +} +\showbox0 +% +% test3: use defaults for everything +% +\setbox0=\hbox{\cals@cs@outOne{100pt}\relax\relax% +\show\cals@lastLeftWidth +} +\showbox0 +% +% test4: background color ignored if no cell width +% +\setbox0=\hbox{\cals@cs@outOne\relax{2pt}{green}} +\showbox0 +% +% test5: defaults are no colors, no borders +% +\def\cals@cs@width{0pt} +\def\cals@bgcolor{} +\setbox0=\hbox{\cals@cs@outOne{300pt}\relax\relax} +\showbox0 +% +% test6: cell width: 0pt != \relax +% +\setbox0=\hbox{\cals@cs@outOne{0pt}{0pt}{}} +\showbox0 + +% +% test7: only \relax +% (Bug hunting for a space) +% +\setbox0=\hbox{\cals@cs@outOne\relax\relax\relax} +\showbox0 diff --git a/macros/latex/contrib/cals/test/colsep/test_20_row.chk b/macros/latex/contrib/cals/test/colsep/test_20_row.chk new file mode 100644 index 0000000000..01e57020f1 --- /dev/null +++ b/macros/latex/contrib/cals/test/colsep/test_20_row.chk @@ -0,0 +1,91 @@ +% +% Test 1 +% +> \boxXX= +\hbox(0.0+0.0)x210.0 +% first cell +.\pdfcolorstack 0 push {0 1 0 rg 0 1 0 RG} +.\rule(*+0.0)x100.0 +.\pdfcolorstack 0 pop +.\glue -100.0 +.\glue -1.5 +.\rule(*+0.0)x3.0 +.\glue -1.5 +.\glue 100.0 +% second cell +.\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG} +.\rule(*+0.0)x110.0 +.\pdfcolorstack 0 pop +.\glue -110.0 +.\glue -2.5 +.\rule(*+0.0)x5.0 +.\glue -2.5 +.\glue 110.0 +% right frame +.\glue -3.0 +.\rule(*+0.0)x6.0 +.\glue -3.0 +% +% Test2 (no columns, only frame border) +% +> \boxXX= +\hbox(0.0+0.0)x0.0 +.\glue -1.0 +.\rule(*+0.0)x2.0 +.\glue -1.0 +% +% Test3 (defaults are used) +% +> \boxXX= +\hbox(0.0+0.0)x250.0 +% first cell +.\pdfcolorstack 0 push {0 g 0 G} +.\rule(*+0.0)x120.0 +.\pdfcolorstack 0 pop +.\glue -120.0 +.\glue -1.0 +.\rule(*+0.0)x2.0 +.\glue -1.0 +.\glue 120.0 +% second cell +.\pdfcolorstack 0 push {0 g 0 G} +.\rule(*+0.0)x130.0 +.\pdfcolorstack 0 pop +.\glue -130.0 +.\glue -0.5 +.\rule(*+0.0)x1.0 +.\glue -0.5 +.\glue 130.0 +% right frame +.\glue -1.0 +.\rule(*+0.0)x2.0 +.\glue -1.0 +% +% Test 4: frame width is bigger as user-specified +% +> \boxXX= +\hbox(0.0+0.0)x100.0 +.\glue -1.5 +.\rule(*+0.0)x3.0 +.\glue -1.5 +.\glue 100.0 +.\glue -2.0 +.\rule(*+0.0)x4.0 +.\glue -2.0 +> \boxXX= +\hbox(0.0+0.0)x100.0 +.\glue -1.5 +.\rule(*+0.0)x3.0 +.\glue -1.5 +.\glue 100.0 +.\glue -2.0 +.\rule(*+0.0)x4.0 +.\glue -2.0 +% +% Bug hunting for a space +% +> \boxXX= +\hbox(0.0+0.0)x0.0 +.\glue -5.0 +.\rule(*+0.0)x10.0 +.\glue -5.0 diff --git a/macros/latex/contrib/cals/test/colsep/test_20_row.tex b/macros/latex/contrib/cals/test/colsep/test_20_row.tex new file mode 100644 index 0000000000..db97970dd3 --- /dev/null +++ b/macros/latex/contrib/cals/test/colsep/test_20_row.tex @@ -0,0 +1,55 @@ +\def\cals@cs@width{1pt} +\def\cals@framecs@width{2pt} +\def\cals@bgcolor{black} + +% +% Normal use +% +\cals@csrow@begin +\def\rborder{4pt} +\cals@csrow@nextcell{100pt}{3pt}\rborder{green} +\def\rborder{6pt} +\cals@csrow@nextcell{110pt}{5pt}\rborder{red} +\cals@csrow@end +\showbox\cals@current@cs + +% +% What happens if we have no columns (should never happen) +% +\cals@csrow@begin +\cals@csrow@end +\showbox\cals@current@cs + +% +% Defaults are used +% +\cals@csrow@begin +\cals@csrow@nextcell{120pt}\relax\relax\relax +\cals@csrow@nextcell{130pt}\relax\relax\relax +\cals@csrow@end +\showbox\cals@current@cs + +% +% test: left frame is bigger as the user-specified width: +% we should not use the maximal width, but drop the default. +% (The first run is not for the test, but for comparation.) +% +\def\rborder{4pt} +\def\cals@framecs@width{2pt} +\cals@csrow@begin +\cals@csrow@nextcell{100pt}{3pt}\rborder{} +\cals@csrow@end +\showbox\cals@current@cs +\def\cals@framecs@width{10pt} +\cals@csrow@begin +\cals@csrow@nextcell{100pt}{3pt}\rborder{} +\cals@csrow@end +\showbox\cals@current@cs + +% +% Bug hunting (a space) +% +\setbox\cals@current@cs=\hbox{} +\let\cals@lastWidth=\relax +\cals@csrow@nextcell\relax\cals@framecs@width\relax\relax +\showbox\cals@current@cs |