check_command() { # $1 is the path to regression files (relative to tests/regression) # $2 is the source file name (the one in pre/) # $3 is filename (correlates to the to compare in post/) # $4 is first part of command (till command to test, undo/redo affect this one) # $5 is second part of command (anything thereafter) regressionpath=${abs_top_srcdir}/${AUTOTEST_PATH}/$1 AT_CHECK([cp -n $regressionpath/pre/$2 test.xyz], 0) AT_CHECK([../../molecuilder -i test.xyz $4 $add $5], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz $regressionpath/post/$3], 0, [ignore], [ignore]) } check_command_output() { # $1 is the path to regression files (relative to tests/regression) # $2 is the source file name (the one in pre/) # $3 is output file name to diff (correlates to the to compare in post/, NOT $testfile) # $4 is first part of command (till command to test, undo/redo affect this one) # $5 is second part of command (anything thereafter) testfile=test.xyz regressionpath=${abs_top_srcdir}/${AUTOTEST_PATH}/$1 AT_CHECK([cp -n $regressionpath/pre/$2 $testfile], 0) AT_CHECK([../../molecuilder -i $testfile $4 $add $5], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $3 $regressionpath/post/$3], 0, [ignore], [ignore]) }