/[groff]/groff/contrib/gdiffmk/tests/runtests.in
ViewVC logotype

Diff of /groff/contrib/gdiffmk/tests/runtests.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wl, Fri Dec 17 05:56:13 2004 UTC revision 1.4 by wl, Sun Jan 16 01:43:21 2005 UTC
# Line 8  command=../gdiffmk Line 8  command=../gdiffmk
8  #       Test the number of arguments and the first argument.  #       Test the number of arguments and the first argument.
9  case $#-$1 in  case $#-$1 in
10  1-clean )  1-clean )
11          rm -fv test_result? tmp_file?          rm -fv test_result* tmp_file*
12          exit 0          exit 0
13          ;;          ;;
14  1-run )  1-run )
# Line 25  run    Run the tests. Line 25  run    Run the tests.
25  esac  esac
26    
27  function TestResult {  function TestResult {
28          if diff $1 $2          if cmp -s $1 $2
29          then          then
30                  echo $2 PASSED                  echo $2 PASSED
31          else          else
32                  echo $2 TEST FAILED '\a'                  echo ''
33                    echo $2 TEST FAILED
34                    diff $1 $2
35                    echo ''
36          fi          fi
37  }  }
38    
# Line 72  TestResult ${srcdir}/test_baseline6 ${Re Line 75  TestResult ${srcdir}/test_baseline6 ${Re
75  #       Test for accidental file overwrite.  #       Test for accidental file overwrite.
76  ResultFile=test_result7  ResultFile=test_result7
77  cp ${srcdir}/file2 tmp_file7  cp ${srcdir}/file2 tmp_file7
78  ${command}  -aA -dD -cC  ${srcdir}/file1 tmp_file7  tmp_file7  >${ResultFile} 2>&1  ${command}  -aA -dD -cC  ${srcdir}/file1 tmp_file7  tmp_file7   \
79                                                            >${ResultFile} 2>&1
80  TestResult ${srcdir}/test_baseline7 ${ResultFile}  TestResult ${srcdir}/test_baseline7 ${ResultFile}
81    
82    #       Test -D option
83    ResultFile=test_result8
84    ${command}  -D  ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
85    TestResult ${srcdir}/test_baseline8 ${ResultFile}
86    
87    #       Test -D  and  -M  options
88    ResultFile=test_result9
89    ${command}  -D  -M '<<<<' '>>>>'                                \
90                            ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
91    TestResult ${srcdir}/test_baseline9 ${ResultFile}
92    
93    #       Test -D  and  -B  options
94    ResultFile=test_result10
95    ${command}  -D  -B  ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
96    TestResult ${srcdir}/test_baseline10 ${ResultFile}
97    
98  #       EOF  #       EOF

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26