#! /bin/bash
#
# @file         stdin.bash
#               This test ensures that reading from .stdin files works.
#
# @author       Wes Garland, wes@kingsds.network
# @date         Aug 2022
#
# peter-timeout: 3

read line1
read line2

[ "$line1" = "$line2" ] && [ "$line1" = "good golly, miss molly!" ] && exit 0

(
  echo "Got:"
  echo "$line1"
  echo "$line2"
  echo
  echo "Expected:"
  cat `dirname "$0"`/stdin.bash.stdin
) >&2
exit 1
