cloverleaf-larry/bin/hl7-diff-set
Bryan Johnson 4828862a8e v0.9.10: hl7-diff-set (batch route-set compare) + hl7-diff --format text readability (F-8)
- hl7-diff-set: compare a whole set of Windows-vs-Linux regression outputs in one
  command — takes two prefixes (+ optional --dir), auto-discovers routes by glob,
  runs hl7-diff per pair (--framing auto --ignore MSH.7, overridable), reports
  per-route PASS/DIFF/MISSING/EXTRA + summary, exit 0 iff all clean (MISSING and
  EXTRA both count as regressions). No more hand-written for-loop with hardcoded names.
- F-8: hl7-diff --format text now shows SEG.FIELD left='...' right='...' with visible
  (empty)/<absent> tokens so a dropped component (e.g. Linux MSH.9.3 absent vs Windows
  ADT_A02) is obvious without opening the message files; --------- message N header now
  uses the real message index (was a stale counter). tsv/count formats unchanged.

Consolidated by Clover; Vera CODE-PASS (Deliverables/2026-07-23-cloverleaf-larry-v0910-hl7-diff-set.md) — own-fixture verification of all route classifications + the absent-token render + F-7 no-hang. Live-acceptance = Bryan's regression run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 11:15:24 -07:00

19 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# hl7-diff-set — direct, on-PATH wrapper for lib/hl7-diff-set.sh: diff a WHOLE
# SET of paired Windows-vs-Linux regression output files in one command
# (auto-discovers routes from two shared file prefixes; no hand-written
# for-loop / hardcoded route list needed). Reuses the existing hl7-diff engine
# per pair — same --ignore/--framing semantics, sane regression defaults.
#
# hl7-diff-set adt_in_regression_out_windows_single adt_in_regression_out_linux_single \
# --dir /opt/cloverleaf/cis2025.01/integrator/adt/data/regression_testing/single
#
# (no `larry tools` prefix needed). All args pass straight through; -h/--help
# is handled by the underlying tool.
set -o pipefail
_self="${BASH_SOURCE[0]}"; [ -L "$_self" ] && _self="$(readlink "$_self")"
. "$(cd "$(dirname "$_self")" && pwd)/_nc_common.sh"
lib="$(_nc_resolve_lib)" || { echo "hl7-diff-set: lib/ toolkit not found (set LARRY_LIB_DIR or LARRY_HOME)" >&2; exit 1; }
if [ $# -eq 0 ]; then exec bash "$lib/hl7-diff-set.sh" --help; fi
exec bash "$lib/hl7-diff-set.sh" "$@"