projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pivot-table: Test round-tripping to an .spv file.
[pspp]
/
tests
/
output
/
pivot-table.at
diff --git
a/tests/output/pivot-table.at
b/tests/output/pivot-table.at
index 543dac1eb0d6ab819ab00759d3f0b222032d29d7..e7daa5563fdaba5382a6d79b52384d4e5b7d80ab 100644
(file)
--- a/
tests/output/pivot-table.at
+++ b/
tests/output/pivot-table.at
@@
-7,7
+7,7
@@
AT_DATA([pivot.txt], [[
/title "Columns" /display
/title "Rows" /transpose.
]])
/title "Columns" /display
/title "Rows" /transpose.
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Columns
╭────────╮
│ a │
Columns
╭────────╮
│ a │
@@
-26,6
+26,8
@@
Rows
│a3│2│
╰──┴─╯
])
│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_CLEANUP
AT_SETUP([2-d pivot table])
@@
-38,7
+40,7
@@
AT_DATA([pivot.txt], [[
/title "Column x Row" /move "a" column /display
/title "Row x Column" /transpose
]])
/title "Column x Row" /move "a" column /display
/title "Row x Column" /transpose
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Columns
╭────────┬────────┬────────╮
│ b1 │ b2 │ b3 │
Columns
╭────────┬────────┬────────╮
│ b1 │ b2 │ b3 │
@@
-81,6
+83,8
@@
Row x Column
│a3│ 2│ 5│ 8│
╰──┴──┴──┴──╯
])
│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_CLEANUP
AT_SETUP([2-d pivot table - dimension labels])
@@
-96,7
+100,7
@@
AT_DATA([pivot.txt], [[
/title "Row x Column - Corner" /transpose /look rowlabels=corner /display
/title "Row x Column - Nested" /look rowlabels=nested
]])
/title "Row x Column - Corner" /transpose /look rowlabels=corner /display
/title "Row x Column - Nested" /look rowlabels=nested
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Columns
╭──────────────────────────╮
│ b │
Columns
╭──────────────────────────╮
│ b │
@@
-186,6
+190,8
@@
Row x Column - Nested
│ a3│ 2│ 5│ 8│
╰────┴──┴──┴──╯
])
│ 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_CLEANUP
AT_SETUP([2-d pivot table - groups])
@@
-202,7
+208,7
@@
AT_DATA([pivot.txt], [[
/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.
]])
/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_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Columns
╭─────────────────┬────────╮
│ bg1 │ │
Columns
╭─────────────────┬────────╮
│ bg1 │ │
@@
-304,6
+310,8
@@
Row x Column - delete b1 - show empty
│ a3│ │ │ 8│
╰──────┴──┴──┴──╯
])
│ 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_CLEANUP
AT_SETUP([2-d pivot table - layers])
@@
-318,7
+326,7
@@
AT_DATA([pivot.txt], [[
/title "Column (All Layers)" /look layers=all /display
/title "Row (All Layers)" /transpose /look layers=all
]])
/title "Column (All Layers)" /look layers=all /display
/title "Row (All Layers)" /transpose /look layers=all
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Column x b1
b1
╭──┬──┬──╮
Column x b1
b1
╭──┬──┬──╮
@@
-399,6
+407,8
@@
b3
│ 6│ 7│ 8│
╰──┴──┴──╯
])
│ 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_CLEANUP
AT_SETUP([3-d pivot table - layers])
@@
-440,6
+450,7
@@
a2
╰──┴──┴──┴──┴──╯
])
AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout])
╰──┴──┴──┴──┴──╯
])
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_CLEANUP
AT_SETUP([pivot table title and caption])
@@
-452,7
+463,7
@@
AT_DATA([pivot.txt], [[
/title "(Not Shown)" /caption "Caption Only" /show title=no caption=yes /display
/title "(Not Shown)" /caption "(Not Shown)" /show title=no caption=no
]])
/title "(Not Shown)" /caption "Caption Only" /show title=no caption=yes /display
/title "(Not Shown)" /caption "(Not Shown)" /show title=no caption=no
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Title + Caption
╭──┬──┬──╮
│ │a1│a2│
Title + Caption
╭──┬──┬──╮
│ │a1│a2│
@@
-485,6
+496,8
@@
Caption Only
│b2│ 2│ 3│
╰──┴──┴──╯
])
│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_CLEANUP
AT_SETUP([pivot table footnotes])
@@
-516,7
+529,7
@@
AT_DATA([pivot.txt], [[
/title "Hidden Footnote"[footnote 0]
/footnote[0] "First footnote" marker="*" hide
]])
/title "Hidden Footnote"[footnote 0]
/footnote[0] "First footnote" marker="*" hide
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
],
+AT_
DATA([expout
],
[[Pivot Table with Alphabetic Subscript Footnotes[*]
╭────────────┬──────────────────╮
│ │ A[*] │
[[Pivot Table with Alphabetic Subscript Footnotes[*]
╭────────────┬──────────────────╮
│ │ A[*] │
@@
-581,17
+594,21
@@
Hidden Footnote[*]
Caption[*]
2. Second footnote
]])
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_CLEANUP
AT_SETUP([pivot table with no dimensions])
AT_DATA([pivot.txt], [[
/title "No Dimensions"
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
No Dimensions
╭╮
╰╯
])
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_CLEANUP
AT_SETUP([pivot table with empty dimensions])
@@
-602,13
+619,15
@@
AT_DATA([pivot.txt], [[
/title "Two Empty Dimensions" /row "b"*() /display
/title "Three Dimensions, Two Empty" /row "c"("c1", "c2")
]])
/title "Two Empty Dimensions" /row "b"*() /display
/title "Three Dimensions, Two Empty" /row "c"("c1", "c2")
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
One Empty Dimension
Two Empty Dimensions
Three Dimensions, Two Empty
])
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_CLEANUP
AT_SETUP([pivot table with empty groups])
@@
-619,7
+638,7
@@
AT_DATA([pivot.txt], [[
/look empty=show
/display
]])
/look empty=show
/display
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Default Title
╭──┬──┬──╮
│ │a1│a3│
Default Title
╭──┬──┬──╮
│ │a1│a3│
@@
-628,6
+647,8
@@
Default Title
│b3│ 2│ 3│
╰──┴──┴──╯
])
│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_CLEANUP
AT_SETUP([pivot table - category and dimension borders])
@@
-648,7
+669,7
@@
AT_DATA([pivot.txt], [[
"cat-col-vert" (dashed "red")
/title "Category and Dimension Borders"
]])
"cat-col-vert" (dashed "red")
/title "Category and Dimension Borders"
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
Category and Dimension Borders
bg1 │
╶╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┤
Category and Dimension Borders
bg1 │
╶╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┤
@@
-675,6
+696,8
@@
d3 │c1 54│55┊56│57│58┊59│60│61┊62
│ ├╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌
│ ┊c3 72│73┊74│75│76┊77│78│79┊80
])
│ ├╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌
│ ┊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_CLEANUP
AT_SETUP([pivot table - small numbers])
@@
-724,7
+747,7
@@
AT_DATA([pivot.txt], [[
/cell[8, 1, 1] = -.00000001
/cell[9, 1, 1] = -.000000001
]])
/cell[8, 1, 1] = -.00000001
/cell[9, 1, 1] = -.000000001
]])
-AT_
CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0
], [dnl
+AT_
DATA([expout
], [dnl
small numbers
╭────────┬─────────────────────────────────────╮
│ │ result class │
small numbers
╭────────┬─────────────────────────────────────╮
│ │ result class │
@@
-747,4
+770,6
@@
small numbers
│-9 │1.00E-009│1.00E-009│ .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
\ No newline at end of file
AT_CLEANUP
\ No newline at end of file