#! /bin/sh # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Sanity check for the automake testsuite. # Check the 'unindent' subroutine. . test-init.sh plan_ 22 #------------------------------------------------------------------ will_test () { tst=$*; } do_check () { command_ok_ "$tst [simple, exit status]" \ eval 'unindent input > got' command_ok_ "$tst [simple, output]" \ diff exp got command_ok_ "$tst [parallel, exit status]" \ eval 'unindent input | unindent > got' command_ok_ "$tst [parallel, output]" \ diff exp got } #------------------------------------------------------------------ will_test 'leading spaces' cat > input < exp < input < exp < input < input < exp < input < exp < input < exp < got' command_ok_ "$tst [output]" diff exp got :