#!/bin/sh
# Copyright (C) 2018 Keziah Wesley
# You can redistribute and/or modify this file under the terms of the
# GNU Affero General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any
# later version.
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public
# License along with this file. If not, see
# .
assert_eq () {
[ "$1" = "$2" ] || ( echo Assertion failed: "\"$1\"" = "\"$2\""; exit 1 )
}
assert_eq 'ROOT' "$(echo '' | ./muddle)"
assert_eq '(ROOT BAZ)' "$(echo '( BAZ)' | ./muddle)"
assert_eq '(ROOT ROOT)' "$(echo '( )' | ./muddle)"