AT_BANNER([pivot table rendering]) AT_SETUP([1-d pivot table]) AT_DATA([pivot.txt], [[ /col "a"*("a1", "a2", "a3") /cell[all] /title "Columns" /display /title "Rows" /transpose. ]]) AT_DATA([expout], [dnl Columns ╭────────╮ │ a │ ├──┬──┬──┤ │a1│a2│a3│ ├──┼──┼──┤ │ 0│ 1│ 2│ ╰──┴──┴──╯ Rows ╭──┬─╮ │a │ │ ├──┼─┤ │a1│0│ │a2│1│ │a3│2│ ╰──┴─╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([2-d pivot table]) AT_DATA([pivot.txt], [[ /col "a"("a1", "a2", "a3") /col "b"("b1", "b2", "b3") /cell[all, all] /title "Columns" /display /title "Rows" /transpose /display /title "Column x Row" /move "a" column /display /title "Row x Column" /transpose ]]) AT_DATA([expout], [dnl Columns ╭────────┬────────┬────────╮ │ b1 │ b2 │ b3 │ ├──┬──┬──┼──┬──┬──┼──┬──┬──┤ │a1│a2│a3│a1│a2│a3│a1│a2│a3│ ├──┼──┼──┼──┼──┼──┼──┼──┼──┤ │ 0│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ ╰──┴──┴──┴──┴──┴──┴──┴──┴──╯ Rows ╭─────┬─╮ │b1 a1│0│ │ a2│1│ │ a3│2│ ├─────┼─┤ │b2 a1│3│ │ a2│4│ │ a3│5│ ├─────┼─┤ │b3 a1│6│ │ a2│7│ │ a3│8│ ╰─────┴─╯ Column x Row ╭──┬──┬──┬──╮ │ │a1│a2│a3│ ├──┼──┼──┼──┤ │b1│ 0│ 1│ 2│ │b2│ 3│ 4│ 5│ │b3│ 6│ 7│ 8│ ╰──┴──┴──┴──╯ Row x Column ╭──┬──┬──┬──╮ │ │b1│b2│b3│ ├──┼──┼──┼──┤ │a1│ 0│ 3│ 6│ │a2│ 1│ 4│ 7│ │a3│ 2│ 5│ 8│ ╰──┴──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([2-d pivot table - dimension labels]) AT_DATA([pivot.txt], [[ /col "a"*("a1", "a2", "a3") /col "b"*("b1", "b2", "b3") /cell[all, all] /title "Columns" /display /title "Rows - Corner" /transpose /display /title "Rows - Nested" /look rowlabels=nested /display /title "Column x Row - Corner" /move "a" column /look rowlabels=corner /display /title "Column x Row - Nested" /look rowlabels=nested /display /title "Row x Column - Corner" /transpose /look rowlabels=corner /display /title "Row x Column - Nested" /look rowlabels=nested ]]) AT_DATA([expout], [dnl Columns ╭──────────────────────────╮ │ b │ ├────────┬────────┬────────┤ │ b1 │ b2 │ b3 │ ├────────┼────────┼────────┤ │ a │ a │ a │ ├──┬──┬──┼──┬──┬──┼──┬──┬──┤ │a1│a2│a3│a1│a2│a3│a1│a2│a3│ ├──┼──┼──┼──┼──┼──┼──┼──┼──┤ │ 0│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ ╰──┴──┴──┴──┴──┴──┴──┴──┴──╯ Rows - Corner ╭─────┬─╮ │b a │ │ ├─────┼─┤ │b1 a1│0│ │ a2│1│ │ a3│2│ ├─────┼─┤ │b2 a1│3│ │ a2│4│ │ a3│5│ ├─────┼─┤ │b3 a1│6│ │ a2│7│ │ a3│8│ ╰─────┴─╯ Rows - Nested ╭─────────┬─╮ │b b1 a a1│0│ │ a2│1│ │ a3│2│ │ ╶───────┼─┤ │ b2 a a1│3│ │ a2│4│ │ a3│5│ │ ╶───────┼─┤ │ b3 a a1│6│ │ a2│7│ │ a3│8│ ╰─────────┴─╯ Column x Row - Corner ╭──┬────────╮ │ │ a │ │ ├──┬──┬──┤ │b │a1│a2│a3│ ├──┼──┼──┼──┤ │b1│ 0│ 1│ 2│ │b2│ 3│ 4│ 5│ │b3│ 6│ 7│ 8│ ╰──┴──┴──┴──╯ Column x Row - Nested ╭────┬────────╮ │ │ a │ │ ├──┬──┬──┤ │ │a1│a2│a3│ ├────┼──┼──┼──┤ │b b1│ 0│ 1│ 2│ │ b2│ 3│ 4│ 5│ │ b3│ 6│ 7│ 8│ ╰────┴──┴──┴──╯ Row x Column - Corner ╭──┬────────╮ │ │ b │ │ ├──┬──┬──┤ │a │b1│b2│b3│ ├──┼──┼──┼──┤ │a1│ 0│ 3│ 6│ │a2│ 1│ 4│ 7│ │a3│ 2│ 5│ 8│ ╰──┴──┴──┴──╯ Row x Column - Nested ╭────┬────────╮ │ │ b │ │ ├──┬──┬──┤ │ │b1│b2│b3│ ├────┼──┼──┼──┤ │a a1│ 0│ 3│ 6│ │ a2│ 1│ 4│ 7│ │ a3│ 2│ 5│ 8│ ╰────┴──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([2-d pivot table - groups]) AT_DATA([pivot.txt], [[ /col "a"("a1", "ag1"("a2", "a3")) /col "b"("bg1"("b1", "b2"), "b3") /cell[all, all] /title "Columns" /display /title "Rows" /transpose /display /title "Column x Row" /move "a" column /display /title "Row x Column" /transpose /display /title "Row x Column - delete b2" /cells[all,1]=delete /display /title "Row x Column - delete b2 - show empty" /look empty=show /display /title "Row x Column - delete b1" /cells[all,0]=delete /look empty=hide /display /title "Row x Column - delete b1 - show empty" /look empty=show. ]]) AT_DATA([expout], [dnl Columns ╭─────────────────┬────────╮ │ bg1 │ │ ├────────┬────────┤ │ │ b1 │ b2 │ b3 │ ├──┬─────┼──┬─────┼──┬─────┤ │ │ ag1 │ │ ag1 │ │ ag1 │ │ ├──┬──┤ ├──┬──┤ ├──┬──┤ │a1│a2│a3│a1│a2│a3│a1│a2│a3│ ├──┼──┼──┼──┼──┼──┼──┼──┼──┤ │ 0│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ ╰──┴──┴──┴──┴──┴──┴──┴──┴──╯ Rows ╭─────────────┬─╮ │bg1 b1 a1 │0│ │ ╶──────┼─┤ │ ag1 a2│1│ │ a3│2│ │ ╶─────────┼─┤ │ b2 a1 │3│ │ ╶──────┼─┤ │ ag1 a2│4│ │ a3│5│ ├─────────────┼─┤ │b3 a1 │6│ │ ╶──────┼─┤ │ ag1 a2│7│ │ a3│8│ ╰─────────────┴─╯ Column x Row ╭──────┬──┬─────╮ │ │ │ ag1 │ │ │ ├──┬──┤ │ │a1│a2│a3│ ├──────┼──┼──┼──┤ │bg1 b1│ 0│ 1│ 2│ │ b2│ 3│ 4│ 5│ ├──────┼──┼──┼──┤ │b3 │ 6│ 7│ 8│ ╰──────┴──┴──┴──╯ Row x Column ╭──────┬─────┬──╮ │ │ bg1 │ │ │ ├──┬──┤ │ │ │b1│b2│b3│ ├──────┼──┼──┼──┤ │a1 │ 0│ 3│ 6│ ├──────┼──┼──┼──┤ │ag1 a2│ 1│ 4│ 7│ │ a3│ 2│ 5│ 8│ ╰──────┴──┴──┴──╯ Row x Column - delete b2 ╭──────┬───┬──╮ │ │bg1│ │ │ ├───┤ │ │ │ b1│b3│ ├──────┼───┼──┤ │a1 │ 0│ 6│ ├──────┼───┼──┤ │ag1 a2│ 1│ 7│ │ a3│ 2│ 8│ ╰──────┴───┴──╯ Row x Column - delete b2 - show empty ╭──────┬─────┬──╮ │ │ bg1 │ │ │ ├──┬──┤ │ │ │b1│b2│b3│ ├──────┼──┼──┼──┤ │a1 │ 0│ │ 6│ ├──────┼──┼──┼──┤ │ag1 a2│ 1│ │ 7│ │ a3│ 2│ │ 8│ ╰──────┴──┴──┴──╯ Row x Column - delete b1 ╭──────┬──╮ │ │b3│ ├──────┼──┤ │a1 │ 6│ ├──────┼──┤ │ag1 a2│ 7│ │ a3│ 8│ ╰──────┴──╯ Row x Column - delete b1 - show empty ╭──────┬─────┬──╮ │ │ bg1 │ │ │ ├──┬──┤ │ │ │b1│b2│b3│ ├──────┼──┼──┼──┤ │a1 │ │ │ 6│ ├──────┼──┼──┼──┤ │ag1 a2│ │ │ 7│ │ a3│ │ │ 8│ ╰──────┴──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([2-d pivot table - layers]) AT_DATA([pivot.txt], [[ /col "a"("a1", "a2", "a3") /layer "b"("b1", "b2", "b3") /cell[all, all] /title "Column x b1" /display /title "Row x b1" /transpose /display /title "Column x b2" /show layer 1 /transpose /display /title "Row x b2" /transpose /display /title "Column (All Layers)" /look layers=all /display /title "Row (All Layers)" /transpose /look layers=all ]]) AT_DATA([expout], [dnl Column x b1 b1 ╭──┬──┬──╮ │a1│a2│a3│ ├──┼──┼──┤ │ 0│ 1│ 2│ ╰──┴──┴──╯ Row x b1 b1 ╭──┬─╮ │a1│0│ │a2│1│ │a3│2│ ╰──┴─╯ Column x b2 b2 ╭──┬──┬──╮ │a1│a2│a3│ ├──┼──┼──┤ │ 3│ 4│ 5│ ╰──┴──┴──╯ Row x b2 b2 ╭──┬─╮ │a1│3│ │a2│4│ │a3│5│ ╰──┴─╯ Column (All Layers) b1 ╭──┬─╮ │a1│0│ │a2│1│ │a3│2│ ╰──┴─╯ Column (All Layers) b2 ╭──┬─╮ │a1│3│ │a2│4│ │a3│5│ ╰──┴─╯ Column (All Layers) b3 ╭──┬─╮ │a1│6│ │a2│7│ │a3│8│ ╰──┴─╯ Row (All Layers) b1 ╭──┬──┬──╮ │a1│a2│a3│ ├──┼──┼──┤ │ 0│ 1│ 2│ ╰──┴──┴──╯ Row (All Layers) b2 ╭──┬──┬──╮ │a1│a2│a3│ ├──┼──┼──┤ │ 3│ 4│ 5│ ╰──┴──┴──╯ Row (All Layers) b3 ╭──┬──┬──╮ │a1│a2│a3│ ├──┼──┼──┤ │ 6│ 7│ 8│ ╰──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([3-d pivot table - layers]) AT_DATA([pivot.txt], [[ /layer "a"("a1", "a2", "a3") /layer "b"("b1", "b2", "b3", "b4") /col "c"("c1", "c2", "c3", "c4", "c5") /cell[all, all, all] /title "Column x b1 x a1" /display /title "Column x b2 x a1" /show layer 0 1 /display /title "Column x b3 x a2" /show layer 1 2 /display ]]) AT_DATA([expout], [dnl Column x b1 x a1 b1 a1 ╭──┬──┬──┬──┬──╮ │c1│c2│c3│c4│c5│ ├──┼──┼──┼──┼──┤ │ 0│12│24│36│48│ ╰──┴──┴──┴──┴──╯ Column x b2 x a1 b2 a1 ╭──┬──┬──┬──┬──╮ │c1│c2│c3│c4│c5│ ├──┼──┼──┼──┼──┤ │ 3│15│27│39│51│ ╰──┴──┴──┴──┴──╯ Column x b3 x a2 b3 a2 ╭──┬──┬──┬──┬──╮ │c1│c2│c3│c4│c5│ ├──┼──┼──┼──┼──┤ │ 7│19│31│43│55│ ╰──┴──┴──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table title and caption]) AT_DATA([pivot.txt], [[ /col "a"("a1", "a2") /row "b"("b1", "b2") /cell[all, all] /title "Title + Caption" /caption "Title + Caption" /display /title "Title Only" /caption "(Not Shown)" /show title=yes caption=no /display /title "(Not Shown)" /caption "Caption Only" /show title=no caption=yes /display /title "(Not Shown)" /caption "(Not Shown)" /show title=no caption=no ]]) AT_DATA([expout], [dnl Title + Caption ╭──┬──┬──╮ │ │a1│a2│ ├──┼──┼──┤ │b1│ 0│ 1│ │b2│ 2│ 3│ ╰──┴──┴──╯ Title + Caption Title Only ╭──┬──┬──╮ │ │a1│a2│ ├──┼──┼──┤ │b1│ 0│ 1│ │b2│ 2│ 3│ ╰──┴──┴──╯ ╭──┬──┬──╮ │ │a1│a2│ ├──┼──┼──┤ │b1│ 0│ 1│ │b2│ 2│ 3│ ╰──┴──┴──╯ Caption Only ╭──┬──┬──╮ │ │a1│a2│ ├──┼──┼──┤ │b1│ 0│ 1│ │b2│ 2│ 3│ ╰──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table footnotes]) AT_KEYWORDS([footnote]) AT_DATA([pivot.txt], [[ /footnote[0] "First footnote" marker="*" /footnote[1] "Second footnote" /col "A"[footnote 0]*("B"[footnote 1], "C"[footnote 0 1]) /row "D"[footnote 1]*("E"[footnote 0], "F"[footnote 1 0]) /look rowlabels=nested /cell[0, 0]=0 /cell[1, 0]=1[footnote 0] /cell[0, 1]=2[footnote 1] /cell[1, 1]=3[footnote 0 1] /caption "Caption"[footnote 0] /corner "Corner"[footnote 0 1] /title "Pivot Table with Alphabetic Subscript Footnotes"[footnote 0] /look marker=alpha level=sub /display /title "Pivot Table with Alphabetic Superscript Footnotes"[footnote 0] /look marker=alpha level=super /display /title "Pivot Table with Numeric Subscript Footnotes"[footnote 0] /look marker=numeric level=sub /display /title "Pivot Table with Numeric Superscript Footnotes"[footnote 0] /look marker=numeric level=super /display /title "Hidden Footnote"[footnote 0] /footnote[0] "First footnote" marker="*" hide ]]) AT_DATA([expout], [[Pivot Table with Alphabetic Subscript Footnotes[*] ╭────────────┬──────────────────╮ │ │ A[*] │ │ ├───────┬──────────┤ │Corner[*][b]│ B[b] │ C[*][b] │ ├────────────┼───────┼──────────┤ │D[b] E[*] │ .00│ 1.00[*]│ │ F[*][b]│2.00[b]│3.00[*][b]│ ╰────────────┴───────┴──────────╯ Caption[*] *. First footnote b. Second footnote Pivot Table with Alphabetic Superscript Footnotes[*] ╭────────────┬──────────────────╮ │ │ A[*] │ │ ├───────┬──────────┤ │Corner[*][b]│ B[b] │ C[*][b] │ ├────────────┼───────┼──────────┤ │D[b] E[*] │ .00│ 1.00[*]│ │ F[*][b]│2.00[b]│3.00[*][b]│ ╰────────────┴───────┴──────────╯ Caption[*] *. First footnote b. Second footnote Pivot Table with Numeric Subscript Footnotes[*] ╭────────────┬──────────────────╮ │ │ A[*] │ │ ├───────┬──────────┤ │Corner[*][2]│ B[2] │ C[*][2] │ ├────────────┼───────┼──────────┤ │D[2] E[*] │ .00│ 1.00[*]│ │ F[*][2]│2.00[2]│3.00[*][2]│ ╰────────────┴───────┴──────────╯ Caption[*] *. First footnote 2. Second footnote Pivot Table with Numeric Superscript Footnotes[*] ╭────────────┬──────────────────╮ │ │ A[*] │ │ ├───────┬──────────┤ │Corner[*][2]│ B[2] │ C[*][2] │ ├────────────┼───────┼──────────┤ │D[2] E[*] │ .00│ 1.00[*]│ │ F[*][2]│2.00[2]│3.00[*][2]│ ╰────────────┴───────┴──────────╯ Caption[*] *. First footnote 2. Second footnote Hidden Footnote[*] ╭────────────┬──────────────────╮ │ │ A[*] │ │ ├───────┬──────────┤ │Corner[*][2]│ B[2] │ C[*][2] │ ├────────────┼───────┼──────────┤ │D[2] E[*] │ .00│ 1.00[*]│ │ F[*][2]│2.00[2]│3.00[*][2]│ ╰────────────┴───────┴──────────╯ Caption[*] 2. Second footnote ]]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table with no dimensions]) AT_DATA([pivot.txt], [[ /title "No Dimensions" ]]) AT_DATA([expout], [dnl No Dimensions ╭╮ ╰╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table with empty dimensions]) AT_DATA([pivot.txt], [[ /col "a"() /look empty=show /title "One Empty Dimension" /display /title "Two Empty Dimensions" /row "b"*() /display /title "Three Dimensions, Two Empty" /row "c"("c1", "c2") ]]) AT_DATA([expout], [dnl One Empty Dimension Two Empty Dimensions Three Dimensions, Two Empty ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table with empty groups]) AT_DATA([pivot.txt], [[ /col "a"("a1", "a2"(), "a3") /row "b"("b1"(), "b2", "b3") /cell[all,all] /look empty=show /display ]]) AT_DATA([expout], [dnl Default Title ╭──┬──┬──╮ │ │a1│a3│ ├──┼──┼──┤ │b2│ 0│ 1│ │b3│ 2│ 3│ ╰──┴──┴──╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table - category and dimension borders]) AT_DATA([pivot.txt], [[ /col "a"("a1", "ag1"("a2", "a3")) /col "b"("bg1"("b1", "b2"), "b3") /row "c"("c1", "cg1"("c2", "c3")) /row "d"("dg1"("d1", "d2"), "d3") /cell[all, all, all, all] /border "*" (none) /border "dim-row-horz" (solid "blue") "cat-row-horz" (dashed "red") "dim-row-vert" (solid "blue") "cat-row-vert" (dashed "red") "dim-col-horz" (solid "blue") "cat-col-horz" (dashed "red") "dim-col-vert" (solid "blue") "cat-col-vert" (dashed "red") /title "Category and Dimension Borders" ]]) AT_DATA([expout], [dnl Category and Dimension Borders bg1 │ ╶╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┤ b1 │ b2 │ b3 ╶──┬─────┼──┬─────┼──┬───── │ ag1 │ │ ag1 │ │ ag1 ├╌╌┬╌╌┤ ├╌╌┬╌╌┤ ├╌╌┬╌╌ a1│a2┊a3│a1│a2┊a3│a1│a2┊a3 dg1┊d1│c1 0│ 1┊ 2│ 3│ 4┊ 5│ 6│ 7┊ 8 ┊ ├───┬─────┼──┼──┼──┼──┼──┼──┼──┼── ┊ │cg1┊c2 9│10┊11│12│13┊14│15│16┊17 ┊ │ ├╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ ┊ │ ┊c3 18│19┊20│21│22┊23│24│25┊26 ├──┼───┴─────┼──┼──┼──┼──┼──┼──┼──┼── ┊d2│c1 27│28┊29│30│31┊32│33│34┊35 ┊ ├───┬─────┼──┼──┼──┼──┼──┼──┼──┼── ┊ │cg1┊c2 36│37┊38│39│40┊41│42│43┊44 ┊ │ ├╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ ┊ │ ┊c3 45│46┊47│48│49┊50│51│52┊53 ───┴──┼───┴─────┼──┼──┼──┼──┼──┼──┼──┼── d3 │c1 54│55┊56│57│58┊59│60│61┊62 ├───┬─────┼──┼──┼──┼──┼──┼──┼──┼── │cg1┊c2 63│64┊65│66│67┊68│69│70┊71 │ ├╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ │ ┊c3 72│73┊74│75│76┊77│78│79┊80 ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP AT_SETUP([pivot table - small numbers]) AT_DATA([pivot.txt], [[ /title "small numbers" /row "exponent"*("0", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9") /col "sign"*("positive", "negative") /col "result class"*("general" RC_OTHER, "specific" RC_RESIDUAL) /cell[0, 0, 0] = 1 /cell[1, 0, 0] = .1 /cell[2, 0, 0] = .01 /cell[3, 0, 0] = .001 /cell[4, 0, 0] = .0001 /cell[5, 0, 0] = .00001 /cell[6, 0, 0] = .000001 /cell[7, 0, 0] = .0000001 /cell[8, 0, 0] = .00000001 /cell[9, 0, 0] = .000000001 /cell[0, 0, 1] = -1 /cell[1, 0, 1] = -.1 /cell[2, 0, 1] = -.01 /cell[3, 0, 1] = -.001 /cell[4, 0, 1] = -.0001 /cell[5, 0, 1] = -.00001 /cell[6, 0, 1] = -.000001 /cell[7, 0, 1] = -.0000001 /cell[8, 0, 1] = -.00000001 /cell[9, 0, 1] = -.000000001 /cell[0, 1, 0] = 1 /cell[1, 1, 0] = .1 /cell[2, 1, 0] = .01 /cell[3, 1, 0] = .001 /cell[4, 1, 0] = .0001 /cell[5, 1, 0] = .00001 /cell[6, 1, 0] = .000001 /cell[7, 1, 0] = .0000001 /cell[8, 1, 0] = .00000001 /cell[9, 1, 0] = .000000001 /cell[0, 1, 1] = -1 /cell[1, 1, 1] = -.1 /cell[2, 1, 1] = -.01 /cell[3, 1, 1] = -.001 /cell[4, 1, 1] = -.0001 /cell[5, 1, 1] = -.00001 /cell[6, 1, 1] = -.000001 /cell[7, 1, 1] = -.0000001 /cell[8, 1, 1] = -.00000001 /cell[9, 1, 1] = -.000000001 ]]) AT_DATA([expout], [dnl small numbers ╭────────┬─────────────────────────────────────╮ │ │ result class │ │ ├───────────────────┬─────────────────┤ │ │ general │ specific │ │ ├───────────────────┼─────────────────┤ │ │ sign │ sign │ │ ├─────────┬─────────┼────────┬────────┤ │exponent│ positive│ negative│positive│negative│ ├────────┼─────────┼─────────┼────────┼────────┤ │0 │ 1.00│ 1.00│ -1.00│ -1.00│ │-1 │ .10│ .10│ -.10│ -.10│ │-2 │ .01│ .01│ -.01│ -.01│ │-3 │ .00│ .00│ .00│ .00│ │-4 │ .00│ .00│ .00│ .00│ │-5 │1.00E-005│1.00E-005│ .00│ .00│ │-6 │1.00E-006│1.00E-006│ .00│ .00│ │-7 │1.00E-007│1.00E-007│ .00│ .00│ │-8 │1.00E-008│1.00E-008│ .00│ .00│ │-9 │1.00E-009│1.00E-009│ .00│ .00│ ╰────────┴─────────┴─────────┴────────┴────────╯ ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) AT_CHECK([pspp-output -O box=unicode convert render.spv -], [0], [expout]) AT_CLEANUP