featurebase/cli/testdata/meta_include
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

24 lines
754 B
Text

// Include with no argument should error.
SEND:\i
EXPECT:executing meta command: meta command 'include' requires exactly one argument
// Include with too many arguments should error.
SEND:\include testdata/people.sql extra
EXPECT:executing meta command: meta command 'include' requires exactly one argument
// Invalid file should error.
SEND:\include invalid.file
EXPECT:executing meta command: opening file: invalid.file: open invalid.file: no such file or directory
SEND:\include testdata/people.sql
EXPECT:
EXPECT:
EXPECT:+-----+------+-----+
EXPECT:| _id | name | age |
EXPECT:+-----+------+-----+
EXPECT:| 1 | Amy | 42 |
EXPECT:| 2 | Bob | 27 |
EXPECT:| 3 | Carl | 33 |
EXPECT:+-----+------+-----+
EXPECT:
EXPECT:mix in a meta command