mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
* 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
34 lines
822 B
Text
34 lines
822 B
Text
// Set to off.
|
|
SEND:\pset tuples_only off
|
|
EXPECT:Tuples only is off.
|
|
|
|
// Set to on.
|
|
SEND:\pset tuples_only on
|
|
EXPECT:Tuples only is on.
|
|
|
|
// Toggle to off.
|
|
SEND:\pset tuples_only
|
|
EXPECT:Tuples only is off.
|
|
|
|
// Toggle to on.
|
|
SEND:\pset tuples_only
|
|
EXPECT:Tuples only is on.
|
|
|
|
// Set to something invalid.
|
|
SEND:\pset tuples_only invalid
|
|
EXPECT:executing meta command: unrecognized value "invalid" for "tuples_only": Boolean expected
|
|
|
|
// Ensure tuples_only shows only tuples.
|
|
SEND:SELECT 1 as foo, 'baz' as bar;
|
|
EXPECT:+---+-----+
|
|
EXPECT:| 1 | baz |
|
|
EXPECT:+---+-----+
|
|
EXPECT:
|
|
|
|
// Set back to off as we started.
|
|
SEND:\pset tuples_only off
|
|
EXPECT:Tuples only is off.
|
|
|
|
// make sure the \t meta-command returns expected errors
|
|
SEND:\t off extra
|
|
EXPECT:executing meta command: meta command 'tuples_only' takes zero or one argument
|