groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: More fixes to Savannah bug #44768.


From: Michael H Bianchi
Subject: [groff] 01/01: More fixes to Savannah bug #44768.
Date: Thu, 23 Apr 2015 17:57:18 +0000

mbianchi pushed a commit to branch master
in repository groff.

commit a4e088bb0a34eeb92f3f1772448e35c1aba370f1
Author: Michael Bianchi <address@hidden>
Date:   Thu Apr 23 13:57:03 2015 -0400

    More fixes to Savannah bug #44768.
---
 contrib/gdiffmk/ChangeLog              |   35 +++++++++
 contrib/gdiffmk/gdiffmk.am             |    2 +
 contrib/gdiffmk/gdiffmk.sh             |  120 ++++++++++++++++----------------
 contrib/gdiffmk/tests/baseline         |   26 -------
 contrib/gdiffmk/tests/baseline.10      |   26 -------
 contrib/gdiffmk/tests/baseline.6       |   26 -------
 contrib/gdiffmk/tests/baseline.8       |   26 -------
 contrib/gdiffmk/tests/baseline.9       |   26 -------
 contrib/gdiffmk/tests/gdiffmk_tests.sh |    2 +
 contrib/gdiffmk/tests/runtests.sh      |   35 +++++++++-
 10 files changed, 134 insertions(+), 190 deletions(-)

diff --git a/contrib/gdiffmk/ChangeLog b/contrib/gdiffmk/ChangeLog
index 49c0546..769b88f 100644
--- a/contrib/gdiffmk/ChangeLog
+++ b/contrib/gdiffmk/ChangeLog
@@ -1,3 +1,38 @@
+2015-04-13  Mike Bianchi <address@hidden>
+       More fixes to Savannah bug #44768.
+
+       * gdiffmk.sh:
+               replace
+                       for OPTION   with  while [ $# -gt 0 ]
+
+                       test -e ...  with  test -f
+
+                       use  ${DIFFCMD}  for the last  diff
+               add     
+                       -s SEDCMD  option
+                       OPTION="$1"
+       
+               many other cosmetic changes documented in the bug Discussion.
+               especially:
+                       capitalize variables  e.g.  CMD=`basename $0`
+ 
+       fix  make check  tests within gdiffmk
+       * tests/gdiffmk_tests.sh
+               add  set -e
+                       fails if ${abs_top_builddir} not set or incorrect
+
+       * tests/runtests.sh
+               add test 6a
+                       # Different values for addmark, changemark, deletemark
+                       # Alternate format of -a -c and -d flag arguments
+
+               add test 9a
+                       # Test -D  and  -M  options
+                       # Alternate format of -M argument.
+
+               add printout of failure count
+               add exit with failure exit_code if any test fails
+
 2015-04-10  Werner LEMBERG  <address@hidden>
 
        Fix Savannah bug #44768.
diff --git a/contrib/gdiffmk/gdiffmk.am b/contrib/gdiffmk/gdiffmk.am
index 848b08b..d69f566 100644
--- a/contrib/gdiffmk/gdiffmk.am
+++ b/contrib/gdiffmk/gdiffmk.am
@@ -35,9 +35,11 @@ EXTRA_DIST += \
   contrib/gdiffmk/tests/runtests.sh \
   contrib/gdiffmk/tests/baseline \
   contrib/gdiffmk/tests/baseline.6 \
+  contrib/gdiffmk/tests/baseline.6a \
   contrib/gdiffmk/tests/baseline.7 \
   contrib/gdiffmk/tests/baseline.8 \
   contrib/gdiffmk/tests/baseline.9 \
+  contrib/gdiffmk/tests/baseline.9a \
   contrib/gdiffmk/tests/baseline.10 \
   contrib/gdiffmk/tests/file1 \
   contrib/gdiffmk/tests/file2
diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
index c0cec41..4b01538 100644
--- a/contrib/gdiffmk/gdiffmk.sh
+++ b/contrib/gdiffmk/gdiffmk.sh
@@ -1,6 +1,7 @@
 #! /bin/sh
 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
 # Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
+# Thanks to Peter Bray for debugging.
 
 # This file is part of the gdiffmk utility, which is part of groff.
 
@@ -19,16 +20,16 @@
 # This file is part of GNU gdiffmk.
 
 
-cmd=`basename $0`
+CMD=`basename $0`
 
 Usage () {
-       if test "$#" -gt 0
+       if test $# -gt 0
        then
-               echo >&2 "${cmd}:  $@"
+               echo >&2 "${CMD}:  $@"
        fi
        echo >&2 "\
 
-Usage:  ${cmd} [ OPTIONS ] FILE1 FILE2 [ OUTPUT ]
+Usage:  ${CMD} [ OPTIONS ] FILE1 FILE2 [ OUTPUT ]
 Place difference marks into the new version of a groff/nroff/troff document.
 FILE1 and FILE2 are compared, using \`diff', and FILE2 is output with
 groff \`.mc' requests added to indicate how it is different from FILE1.
@@ -53,6 +54,8 @@ OPTIONS:
 
   -x DIFFCMD     Use a different diff(1) command;
                   one that accepts the \`-Dname' option, such as GNU diff.
+  -s SEDCMD      Use a different sed(1) command;
+                  one that accepts ????????????????????, such as GNU sed.
   --version      Print version information on the standard output and exit.
   --help         Print this message on the standard error.
 "
@@ -65,7 +68,7 @@ Exit () {
        shift
        for arg
        do
-               echo >&2 "${cmd}:  $1"
+               echo >&2 "${CMD}:  $1"
                shift
        done
        exit ${exitcode}
@@ -82,7 +85,7 @@ FileRead () {
                ;;
        esac
 
-       if test ! -e "$2"
+       if test ! -f "$2"
        then
                Exit $1 "File \`$2' not found."
        fi
@@ -104,9 +107,10 @@ FileCreate () {
                ;;
        esac
 
-       if ! touch "$2" 2>/dev/null
+       touch "$2" 2>/dev/null
+       if test $? -ne 0
        then
-               if test ! -e "$2"
+               if test ! -f "$2"
                then
                        Exit $1 "File \`$2' not created; " \
                          "Cannot write directory \``dirname "$2"`'."
@@ -146,7 +150,7 @@ RequiresArgument () {
                ;;
        esac
 
-       if test "$#" -lt 2
+       if test $# -lt 2
        then
                Exit 255 "Option \`$1' requires a value."
        fi
@@ -155,47 +159,53 @@ RequiresArgument () {
        return 0
 }
 
-badoption=
+BADOPTION=
 DIFFCMD=diff
+SEDCMD=sed
 D_option=
 br=.br
-for OPTION
+while [ $# -gt 0 ]
 do
+       OPTION="$1"
        case "${OPTION}" in
        -a*)
-               ADDMARK=`RequiresArgument "${OPTION}" $2`               &&
+               ADDMARK=`RequiresArgument "${OPTION}" "$2"`             &&
                        shift
                ;;
        -c*)
-               CHANGEMARK=`RequiresArgument "${OPTION}" $2`            &&
+               CHANGEMARK=`RequiresArgument "${OPTION}" "$2"`          &&
                        shift
                ;;
        -d*)
-               DELETEMARK=`RequiresArgument "${OPTION}" $2`            &&
+               DELETEMARK=`RequiresArgument "${OPTION}" "$2"`          &&
                        shift
                ;;
        -D )
                D_option=D_option
                ;;
        -M* )
-               MARK1=`RequiresArgument "${OPTION}" $2`                 &&
+               MARK1=`RequiresArgument "${OPTION}" "$2"`               &&
                        shift
                if [ $# -lt 2 ]
                then
                        Usage "Option \`-M' is missing the MARK2 value."
                fi
-               MARK2=$2
+               MARK2="$2"
                shift
                ;;
        -B )
                br=.
                ;;
+       -s* )
+               SEDCMD=`RequiresArgument "${OPTION}" "$2"`              &&
+                       shift
+               ;;
        -x* )
-               DIFFCMD=`RequiresArgument "${OPTION}" $2`               &&
+               DIFFCMD=`RequiresArgument "${OPTION}" "$2"`             &&
                        shift
                ;;
        --version)
-               echo "GNU ${cmd} (groff) version @VERSION@"
+               echo "GNU ${CMD} (groff) version @VERSION@"
                exit 0
                ;;
        --help)
@@ -210,7 +220,7 @@ do
                break
                ;;
        -*)
-               badoption="${cmd}:  invalid option \`$1'"
+               BADOPTION="${CMD}:  invalid option \`$1'"
                ;;
        *)
                break
@@ -224,28 +234,28 @@ ${DIFFCMD} -Dx /dev/null /dev/null >/dev/null 2>&1  ||
                "the required \`-Dname' option.
 Use GNU diff instead.  See the \`-x DIFFCMD' option."
 
-if test -n "${badoption}"
+if test -n "${BADOPTION}"
 then
-       Usage "${badoption}"
+       Usage "${BADOPTION}"
 fi
 
-if test "$#" -lt 2  -o  "$#" -gt 3
+if test $# -lt 2  -o  $# -gt 3
 then
        Usage "Incorrect number of arguments."
 fi
 
-if test "1$1" = 1-  -a  "2$2" = 2-
+if test "1$1" = "1-"  -a  "2$2" = "2-"
 then
        Usage "Both FILE1 and FILE2 are \`-'."
 fi
 
-FILE1=$1
-FILE2=$2
+FILE1="$1"
+FILE2="$2"
 
 FileRead 1 "${FILE1}"
 FileRead 2 "${FILE2}"
 
-if test "$#" = 3
+if test $# = 3
 then
        case "$3" in
        -)
@@ -262,24 +272,24 @@ then
        esac
 fi
 
-#      To make a very unlikely label even more unlikely ...
-label=__diffmk_$$__
+#      To make a very unlikely LABEL even more unlikely ...
+LABEL=__diffmk_$$__
 
-sed_script='
-               /^#ifdef '"${label}"'/,/^#endif \/\* '"${label}"'/ {
-                 /^#ifdef '"${label}"'/          s/.*/.mc '"${ADDMARK}"'/
-                 /^#endif \/\* '"${label}"'/     s/.*/.mc/
+SED_SCRIPT='
+               /^#ifdef '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+                 /^#ifdef '"${LABEL}"'/          s/.*/.mc '"${ADDMARK}"'/
+                 /^#endif \/\* '"${LABEL}"'/     s/.*/.mc/
                  p
                  d
                }
-               /^#ifndef '"${label}"'/,/^#endif \/\* [!not ]*'"${label}"'/ {
-                 /^#else \/\* '"${label}"'/,/^#endif \/\* '"${label}"'/ {
-                   /^#else \/\* '"${label}"'/    s/.*/.mc '"${CHANGEMARK}"'/
-                   /^#endif \/\* '"${label}"'/   s/.*/.mc/
+               /^#ifndef '"${LABEL}"'/,/^#endif \/\* [!not ]*'"${LABEL}"'/ {
+                 /^#else \/\* '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+                   /^#else \/\* '"${LABEL}"'/    s/.*/.mc '"${CHANGEMARK}"'/
+                   /^#endif \/\* '"${LABEL}"'/   s/.*/.mc/
                    p
                    d
                  }
-                 /^#endif \/\* \(not\|!\) '"${label}"'/ {
+                 /^#endif \/\* \(not\|!\) '"${LABEL}"'/ {
                   s/.*/.mc '"${DELETEMARK}"'/p
                   a\
 .mc
@@ -291,27 +301,27 @@ sed_script='
 
 if [ ${D_option} ]
 then
-       sed_script='
-               /^#ifdef '"${label}"'/,/^#endif \/\* '"${label}"'/ {
-                 /^#ifdef '"${label}"'/          s/.*/.mc '"${ADDMARK}"'/
-                 /^#endif \/\* '"${label}"'/     s/.*/.mc/
+       SED_SCRIPT='
+               /^#ifdef '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+                 /^#ifdef '"${LABEL}"'/          s/.*/.mc '"${ADDMARK}"'/
+                 /^#endif \/\* '"${LABEL}"'/     s/.*/.mc/
                  p
                  d
                }
-               /^#ifndef '"${label}"'/,/^#endif \/\* [!not ]*'"${label}"'/ {
-                 /^#ifndef '"${label}"'/ {
+               /^#ifndef '"${LABEL}"'/,/^#endif \/\* [!not ]*'"${LABEL}"'/ {
+                 /^#ifndef '"${LABEL}"'/ {
                   i\
 '"${MARK1}"'
                   d
                  }
-                 /^#else \/\* '"${label}"'/ ! {
-                  /^#endif \/\* [!not ]*'"${label}"'/ ! {
+                 /^#else \/\* '"${LABEL}"'/ ! {
+                  /^#endif \/\* [!not ]*'"${LABEL}"'/ ! {
                    p
                    d
                   }
                  }
-                 /^#else \/\* '"${label}"'/,/^#endif \/\* '"${label}"'/ {
-                   /^#else \/\* '"${label}"'/ {
+                 /^#else \/\* '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+                   /^#else \/\* '"${LABEL}"'/ {
                     i\
 '"${MARK2}"'\
 '"${br}"'
@@ -320,11 +330,11 @@ then
 .mc '"${CHANGEMARK}"'
                     d
                    }
-                   /^#endif \/\* '"${label}"'/   s/.*/.mc/
+                   /^#endif \/\* '"${LABEL}"'/   s/.*/.mc/
                    p
                    d
                  }
-                 /^#endif \/\* \(not\|!\) '"${label}"'/ {
+                 /^#endif \/\* \(not\|!\) '"${LABEL}"'/ {
                   i\
 '"${MARK2}"'\
 '"${br}"'
@@ -338,15 +348,7 @@ then
        '
 fi
 
-diff -D"${label}" -- ${FILE1} ${FILE2}  |
-       sed -n "${sed_script}"
+${DIFFCMD} -D"${LABEL}" -- "${FILE1}" "${FILE2}"  |
+       ${SEDCMD} -n "${SED_SCRIPT}"
 
 # EOF
-
-
-########################################################################
-# Emacs settings
-#
-# Local Variables:
-# mode: text
-# End:
diff --git a/contrib/gdiffmk/tests/baseline b/contrib/gdiffmk/tests/baseline
index 4414ef9..6b32992 100644
--- a/contrib/gdiffmk/tests/baseline
+++ b/contrib/gdiffmk/tests/baseline
@@ -1,24 +1,3 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-This file is part of the gdiffmk utility, which is part of groff.
-Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
 .ll 25
 .pl 20
 .nf
@@ -36,8 +15,3 @@ file1 and file2 #3
 .mc
 file1 and file2 #4
 file1 and file2 #5
-.
-.\" Emacs setup
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/gdiffmk/tests/baseline.10 
b/contrib/gdiffmk/tests/baseline.10
index aacead6..b523f45 100644
--- a/contrib/gdiffmk/tests/baseline.10
+++ b/contrib/gdiffmk/tests/baseline.10
@@ -1,24 +1,3 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-This file is part of the gdiffmk utility, which is part of groff.
-Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
 .ll 25
 .pl 20
 .nf
@@ -45,8 +24,3 @@ file1 only
 .mc
 file1 and file2 #4
 file1 and file2 #5
-.
-.\" Emacs setup
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/gdiffmk/tests/baseline.6 b/contrib/gdiffmk/tests/baseline.6
index abca50e..3156961 100644
--- a/contrib/gdiffmk/tests/baseline.6
+++ b/contrib/gdiffmk/tests/baseline.6
@@ -1,24 +1,3 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-This file is part of the gdiffmk utility, which is part of groff.
-Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
 .ll 25
 .pl 20
 .nf
@@ -36,8 +15,3 @@ file1 and file2 #3
 .mc
 file1 and file2 #4
 file1 and file2 #5
-.
-.\" Emacs setup
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/gdiffmk/tests/baseline.8 b/contrib/gdiffmk/tests/baseline.8
index d6b7fea..9846dd5 100644
--- a/contrib/gdiffmk/tests/baseline.8
+++ b/contrib/gdiffmk/tests/baseline.8
@@ -1,24 +1,3 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-This file is part of the gdiffmk utility, which is part of groff.
-Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
 .ll 25
 .pl 20
 .nf
@@ -45,8 +24,3 @@ file1 only
 .mc
 file1 and file2 #4
 file1 and file2 #5
-.
-.\" Emacs setup
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/gdiffmk/tests/baseline.9 b/contrib/gdiffmk/tests/baseline.9
index 3af8755..50fe57d 100644
--- a/contrib/gdiffmk/tests/baseline.9
+++ b/contrib/gdiffmk/tests/baseline.9
@@ -1,24 +1,3 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2004-2014 Free Software Foundation, Inc.
-
-This file is part of the gdiffmk utility, which is part of groff.
-Written by Mike Bianchi <address@hidden <mailto:address@hidden>>
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
 .ll 25
 .pl 20
 .nf
@@ -45,8 +24,3 @@ file1 only
 .mc
 file1 and file2 #4
 file1 and file2 #5
-.
-.\" Emacs setup
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/gdiffmk/tests/gdiffmk_tests.sh 
b/contrib/gdiffmk/tests/gdiffmk_tests.sh
index 68be85f..e74d594 100755
--- a/contrib/gdiffmk/tests/gdiffmk_tests.sh
+++ b/contrib/gdiffmk/tests/gdiffmk_tests.sh
@@ -2,6 +2,8 @@
 
 # Execute runtests.sh in the builddir 
 
+set -e
+
 mkdir -p ${abs_top_builddir}/contrib/gdiffmk/tests
 cd ${abs_top_builddir}/contrib/gdiffmk/tests
 ${abs_top_srcdir}/contrib/gdiffmk/tests/runtests.sh run
diff --git a/contrib/gdiffmk/tests/runtests.sh 
b/contrib/gdiffmk/tests/runtests.sh
index 9fbad83..f5f8097 100755
--- a/contrib/gdiffmk/tests/runtests.sh
+++ b/contrib/gdiffmk/tests/runtests.sh
@@ -29,7 +29,7 @@ srcdir=${abs_top_srcdir}/contrib/gdiffmk/tests
 command=${abs_top_builddir}/gdiffmk
 
 #      Test the number of arguments and the first argument.
-case $#-$1 in
+case "$#-$1" in
 1-clean )
        rm -fv result* tmp_file*
        exit 0
@@ -47,6 +47,8 @@ run   Run the tests.
        ;;
 esac
 
+exit_code=0    #  Success
+failure_count=0
 TestResult () {
        if cmp -s $1 $2
        then
@@ -56,6 +58,8 @@ TestResult () {
                echo $2 TEST FAILED
                diff $1 $2
                echo ''
+               exit_code=1     #  Failure
+               failure_count=`expr ${failure_count} + 1`
        fi
 }
 
@@ -70,31 +74,44 @@ ${command}  ${srcdir}/file1  ${srcdir}/file2 ${ResultFile} 
2>${tmpfile}
 cat ${tmpfile} >>${ResultFile}
 TestResult ${srcdir}/baseline ${ResultFile}
 
+
 #      OUTPUT to stdout by default
 ResultFile=result.2
 ${command}  ${srcdir}/file1  ${srcdir}/file2  >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline ${ResultFile}
 
+
 #      OUTPUT to stdout via  -  argument
 ResultFile=result.3
 ${command}  ${srcdir}/file1  ${srcdir}/file2 - >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline ${ResultFile}
 
+
 #      FILE1 from standard input via  -  argument
 ResultFile=result.4
 ${command}  - ${srcdir}/file2 <${srcdir}/file1  >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline ${ResultFile}
 
+
 #      FILE2 from standard input via  -  argument
 ResultFile=result.5
 ${command}  ${srcdir}/file1 - <${srcdir}/file2  >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline ${ResultFile}
 
+
 #      Different values for addmark, changemark, deletemark
 ResultFile=result.6
 ${command}  -aA -cC -dD  ${srcdir}/file1 ${srcdir}/file2  >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline.6 ${ResultFile}
 
+
+#      Different values for addmark, changemark, deletemark
+#      Alternate format of -a -c and -d flag arguments
+ResultFile=result.6a
+${command}  -a A -c C -d D  ${srcdir}/file1 ${srcdir}/file2  >${ResultFile} 
2>&1
+TestResult ${srcdir}/baseline.6a ${ResultFile}
+
+
 #      Test for accidental file overwrite.
 ResultFile=result.7
 cp ${srcdir}/file2 tmp_file.7
@@ -102,20 +119,36 @@ ${command}  -aA -dD -cC  ${srcdir}/file1 tmp_file.7  
tmp_file.7   \
                                                        >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline.7 ${ResultFile}
 
+
 #      Test -D option
 ResultFile=result.8
 ${command}  -D  ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline.8 ${ResultFile}
 
+
 #      Test -D  and  -M  options
 ResultFile=result.9
 ${command}  -D  -M '<<<<' '>>>>'                               \
                        ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline.9 ${ResultFile}
 
+
+#      Test -D  and  -M  options
+#      Alternate format of -M argument.
+ResultFile=result.9a
+${command}  -D  -M'<<<<' '>>>>'                                \
+                       ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
+TestResult ${srcdir}/baseline.9a ${ResultFile}
+
+
 #      Test -D  and  -B  options
 ResultFile=result.10
 ${command}  -D  -B  ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1
 TestResult ${srcdir}/baseline.10 ${ResultFile}
 
+
+echo failure_count ${failure_count}
+
+exit ${exit_code}
+
 #      EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]