#!/bin/bash
# Test skraak calls clip-labels
# Compares output against reference CSVs in clip-labels_test_data/
#
# Two test cases:
# 1. Normal (OPSO-equivalent): output matches clip_labels_opso.csv
# 2. __IGNORE__ mapping: D03 clips overlapping the ignored segment are excluded,
# but the file is not dropped entirely
#
# Note: removes clip_labels.csv and clip_labels_ignore.csv before each run
# because the command appends and checks for duplicates.
TEST_DIR="/clip-labels_test_data"
# ── Test 1: OPSO-equivalent output ──────────────────────────────────────
# Compare: sort both, skip header
diff_output=
if [; then
||
else
|
||
fi
||
# ── Test 2: __IGNORE__ mapping ──────────────────────────────────────────
# With __IGNORE__, clips overlapping the Don't Know segment (777-860s)
# in D03 are excluded, but D03's other clips are still emitted.
# The non-D03 rows should be identical to opso.
diff_output=
if [; then
||
else
|
||
fi
||
# Verify D03 IS present in ignore output (file not dropped)
if ; then
||
else
||
fi
||
# Verify D03 clips overlapping the __IGNORE__ segment (775-860s) are excluded
d03_ignore=
d03_opso=
if [; then
||
else
||
fi
||
# Verify no D03 clips in the 775-860s range appear in ignore output
d03_in_range=
if [; then
||
else
||
fi
||