#!/bin/sh normalize() { ./normalize "$1" < EOF } test() { # normalize "$1" GET=`normalize "$1"` if [ "$GET" != "$2" ]; then echo "expect |$1|, got: |$GET|" exit 1 fi } test "get done" "get done" test "AAA BBB" "AAA BBB" test "AAA AAA DDD" "AAA AAA DDD" test "AAA" "AAA" test "AAA" "AAA" exit 0