featurebase/cli/testdata/meta_pset_expanded
Travis Turner 37ee6ea482
fbsql integration test framework (#2308)
* stub out a test framework for fbsql

* Introduce fbsql integration test framework.

This also adds support for `pset location` to set the geo location (i.e.
time zone) in which timestamps should be displayed. And it adds support
for comments (lines starting with `--`) in the line reader/splitter.

* Replace Stdin and Stderr with setters and un-export them
2023-03-13 16:29:18 -05:00

35 lines
853 B
Text

// Set to off.
SEND:\pset expanded off
EXPECT:Expanded display is off.
// Set to on.
SEND:\pset expanded on
EXPECT:Expanded display is on.
// Toggle to off.
SEND:\pset expanded
EXPECT:Expanded display is off.
// Toggle to on.
SEND:\pset expanded
EXPECT:Expanded display is on.
// Set to something invalid.
SEND:\pset expanded invalid
EXPECT:executing meta command: unrecognized value "invalid" for "expanded": Boolean expected
// Ensure expanded shows results vertically.
SEND:SELECT 1 as foo, 'baz' as bar;
EXPECT:+-----+-----+
EXPECT:| foo | 1 |
EXPECT:| bar | baz |
EXPECT:+-----+-----+
EXPECT:
// Set back to off as we started.
SEND:\pset expanded off
EXPECT:Expanded display is off.
// make sure the \x meta-command returns expected errors
SEND:\x on extra
EXPECT:executing meta command: meta command 'expanded' takes zero or one argument