diff --git a/adif/adx.go b/adif/adx.go index bc52672..80be0cc 100644 --- a/adif/adx.go +++ b/adif/adx.go @@ -247,5 +247,8 @@ func (o *ADXIO) Write(l *Logfile, out io.Writer) error { if err := e.EncodeElement(&f, start); err != nil { return fmt.Errorf("error writing ADX file %s: %w", l.Filename, err) } + if _, err := out.Write([]byte("\n")); err != nil { + return fmt.Errorf("error writing ADX file %s: %w", l.Filename, err) + } return nil } diff --git a/adif/adx_test.go b/adif/adx_test.go index 510bf53..4413ad1 100644 --- a/adif/adx_test.go +++ b/adif/adx_test.go @@ -233,7 +233,8 @@ Inverted L antenna, 70' above ground -` + +` adx := NewADXIO() adx.Indent = 2 out := &strings.Builder{} diff --git a/cmd/save_test.go b/cmd/save_test.go index a48ddb1..07e4f22 100644 --- a/cmd/save_test.go +++ b/cmd/save_test.go @@ -69,7 +69,8 @@ Comment about Santa on the Air N0P 20221224 2m { name: "infer ADX", filename: "out.adx", - want: xml.Header + `
3.1.4test save5.6.7
W1AW1987060540mN0P202212242m
`, + want: xml.Header + `
3.1.4test save5.6.7
W1AW1987060540mN0P202212242m
+`, }, { name: "infer CSV",