From ab8ecd65feeaaa62c82e462a8c862689d927888d Mon Sep 17 00:00:00 2001 From: rouggy Date: Mon, 31 Aug 2026 22:30:32 +0200 Subject: [PATCH] test(adif): assert FREQ_RX reaches the forwarded record too The fix filled both halves of the receive side, but the test only proved BAND_RX came out the other end. FREQ_RX is the half the question was really about. --- rxdefaults_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rxdefaults_test.go b/rxdefaults_test.go index 1430a5d..2038d70 100644 --- a/rxdefaults_test.go +++ b/rxdefaults_test.go @@ -20,10 +20,15 @@ func TestFillRXDefaults(t *testing.T) { if q.FreqRXHz == nil || *q.FreqRXHz != hz { t.Errorf("FreqRXHz = %v, want %d", q.FreqRXHz, hz) } - rec := adif.SingleRecordADIF(q) - if !strings.Contains(strings.ToUpper(rec), "20M") { + // Assert on the RECORD another logger reads, not merely on the struct: + // both halves of the receive side have to reach it. + rec := strings.ToUpper(adif.SingleRecordADIF(q)) + if !strings.Contains(rec, "20M") { t.Errorf("BAND_RX missing from the forwarded record:\n%s", rec) } + if !strings.Contains(rec, "14.074000") { + t.Errorf("FREQ_RX missing from the forwarded record:\n%s", rec) + } } // A genuine split contact keeps what it was given.