From 20e1b9d9303a66e492ba1a12437971b817785e84 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 4 Apr 2023 09:32:18 -0400 Subject: [PATCH] Update tapdiffer version. --- tests/Makefile | 2 +- tests/tapdiffer | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index b49a2f2..24ec9bf 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -162,7 +162,7 @@ oldcompare: else \ ./advent430 <$${stem}.log | oldfilter >$${stem}.ochk; \ ../advent <$${stem}.log >$${stem}.log-new; \ - ./newfilter <$${stem}.log-new | tapdiffer -w "$${stem}: $${legend}" $${stem}.ochk; \ + ./newfilter <$${stem}.log-new | tapdiffer -b "$${stem}: $${legend}" $${stem}.ochk; \ fi; \ done; \ echo 1..$(words $(shell ls *.log))) | $(TAPFILTER) diff --git a/tests/tapdiffer b/tests/tapdiffer index ebf270b..495427e 100755 --- a/tests/tapdiffer +++ b/tests/tapdiffer @@ -1,6 +1,6 @@ #! /bin/sh # SPDX-FileCopyrightText: Eric S. Raymond -# SPDX-License-Identifier: BSD-2-Clause +# SPDX-License-Identifier: MIT-0 # # tapdiffer - Render diff between input and checkfile as a TAP report # @@ -10,9 +10,19 @@ # A nonempty diff is shipped as a TAP YAML block following "not ok" # unless QUIET=1 in the environment. # -if [ "$1" = "-w" ] +# This code is intended to be embedded in your project. The author +# grants permission for it to be distributed under the prevailing +# license of your project if you choose, provided that license is +# OSD-compliant; otherwise the following SPDX tag incorporates the +# MIT No Attribution license by reference. +# +# A newer version may be available at https://gitlab.com/esr/tapview +# Check your last commit dqte for this file against the commit list +# there to see if it might be a good idea to update. +# +if [ "$1" = "-b" ] then - diffopts=-ubZ + diffopts=-ub shift else diffopts=-u @@ -23,7 +33,7 @@ checkfile=$2 trap 'rm /tmp/tapdiff$$' EXIT HUP INT QUIT TERM -if diff --text "${diffopts}" ${checkfile} - >/tmp/tapdiff$$ +if diff --text "${diffopts}" "${checkfile}" - >/tmp/tapdiff$$ then echo "ok - ${legend}" else -- 2.31.1