#!/bin/bash set -euo pipefail # Verify that loading a non existent file is an error, not a segfault load_nonexistent() { cat < /dev/null 2> testcase-stderr.txt # We expect the 'SELECT 123' command to NOT have been run if grep -q 123 testcase-out.txt; then echo "...FAILED; expected an error message. Check testcase-{out,err}.txt" >&2 exit 1 fi } main "$@"