15 lines
362 B
Bash
15 lines
362 B
Bash
#!/bin/sh
|
|
# Smoke test for the Record Manager CLI.
|
|
# Usage: smoke.sh <path-to-binary>
|
|
set -eu
|
|
|
|
BIN="${1:-build/recman}"
|
|
|
|
out=$(printf 'help\nadd Ada ada@x.io 555-0100\nquit\n' | "$BIN")
|
|
|
|
echo "$out" | grep -q "Record Manager — commands"
|
|
echo "$out" | grep -q "added: Ada"
|
|
|
|
printf 'bogus\nquit\n' | "$BIN" | grep -q "unknown command"
|
|
|
|
echo "smoke tests passed"
|