Code

integration/query.sh: Check that empty commands work fine.
authorSebastian Harl <sh@tokkee.org>
Sun, 1 Mar 2015 18:16:23 +0000 (19:16 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 1 Mar 2015 18:16:23 +0000 (19:16 +0100)
t/integration/query.sh

index 5bd09b4507961be4614dd59f7c54334fef3d1bf7..46568569a57c307d9672a66472ce5f5456679ded 100755 (executable)
@@ -77,6 +77,10 @@ output="$( run_sysdb -H "$SOCKET_FILE" -c INVALID 2>&1 )" && exit 1
 echo "$output" | grep "Failed to parse query 'INVALID'"
 echo "$output" | grep "parse error: syntax error"
 
+# Empty query.
+output="$( run_sysdb -H "$SOCKET_FILE" -c '' )"
+test -z "$output"
+
 # Simple, successful commands.
 output="$( run_sysdb -H "$SOCKET_FILE" -c 'LIST hosts' )"
 echo "$output" \