Debian Codegraph @

tests/cmpdiffer

raw
1 #! /bin/sh
2 #
3 # cmpdiffer - Render binary cm[ between input and checkfile as a TAP report
4 #
5 # Usage: cmpdiffer LEGEND CHECKFILE
6 #
7 # Output is a TAP report, ok if the cmp is empty and not ok otherwise.
8 #
9 # This code is intended to be embedded in your project. The author
10 # grants permission for it to be distributed under the prevailing
11 # license of your project if you choose, provided that license is
12 # OSD-compliant; otherwise the following SPDX tag incorporates the
13 # MIT No Attribution license by reference.
14 #
15 # SPDX-FileCopyrightText: (C) Eric S. Raymond <[email protected]>
16 # SPDX-License-Identifier: MIT-0
17 #
18 # A newer version may be available at https://gitlab.com/esr/tapview
19 # Check your last commit dqte for this file against the commit list
20 # there to see if it might be a good idea to update.
21 #
22 legend=$1
23 checkfile=$2
24
25 if cmp "${checkfile}" -
26 then
27 echo "ok - ${legend}"
28 else
29 echo "not ok - ${legend}"
30 fi
31
32 # end