-
Notifications
You must be signed in to change notification settings - Fork 583
Expand file tree
/
Copy pathcommand_option.feature
More file actions
38 lines (31 loc) · 1.31 KB
/
command_option.feature
File metadata and controls
38 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Feature: run the cli with -c/--command option,
execute a single command,
and exit
Scenario: run pgcli with -c and a SQL query
When we run pgcli with -c "SELECT 1 as test_column"
then we see the query result
and pgcli exits successfully
Scenario: run pgcli with --command and a SQL query
When we run pgcli with --command "SELECT 'hello' as greeting"
then we see the query result
and pgcli exits successfully
Scenario: run pgcli with -c and a special command
When we run pgcli with -c "\dt"
then we see the command output
and pgcli exits successfully
Scenario: run pgcli with -c and an invalid query
When we run pgcli with -c "SELECT invalid_column FROM nonexistent_table"
then we see an error message
and pgcli exits successfully
Scenario: run pgcli with -c and multiple statements
When we run pgcli with -c "SELECT 1; SELECT 2"
then we see both query results
and pgcli exits successfully
Scenario: run pgcli with multiple -c options
When we run pgcli with multiple -c options
then we see all command outputs
and pgcli exits successfully
Scenario: run pgcli with mixed -c and --command options
When we run pgcli with mixed -c and --command
then we see all command outputs
and pgcli exits successfully