From 2ee374eddc89d4f2021a05bc8f1ce3cb9130578e Mon Sep 17 00:00:00 2001 From: Eduard Castany Date: Sun, 27 Oct 2024 00:21:31 +0200 Subject: [PATCH 1/2] fix EBCDIC1047 prefixer description --- prefix/ebcdic1047.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prefix/ebcdic1047.go b/prefix/ebcdic1047.go index 71a7a053..850d988a 100644 --- a/prefix/ebcdic1047.go +++ b/prefix/ebcdic1047.go @@ -62,7 +62,7 @@ func (p *ebcdic1047Prefixer) DecodeLength(maxLen int, data []byte) (int, int, er } func (p *ebcdic1047Prefixer) Inspect() string { - return fmt.Sprintf("EBCDIC.%s", strings.Repeat("L", p.digits)) + return fmt.Sprintf("EBCDIC1047.%s", strings.Repeat("L", p.digits)) } type ebcdic1047FixedPrefixer struct{} @@ -80,5 +80,5 @@ func (p *ebcdic1047FixedPrefixer) DecodeLength(fixLen int, data []byte) (int, in } func (p *ebcdic1047FixedPrefixer) Inspect() string { - return "EBCDIC.Fixed" + return "EBCDIC1047.Fixed" } From bb73cfb3ab928b94a91c39a973185460f5b84fe2 Mon Sep 17 00:00:00 2001 From: Eduard Castany Date: Sun, 27 Oct 2024 10:16:06 +0100 Subject: [PATCH 2/2] update EBCDIC1047 tests to new Inspect string --- prefix/ebcdic1047_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prefix/ebcdic1047_test.go b/prefix/ebcdic1047_test.go index 405bf81b..da486943 100644 --- a/prefix/ebcdic1047_test.go +++ b/prefix/ebcdic1047_test.go @@ -420,9 +420,9 @@ func TestEBCDIC1047PrefixersDecodeErrors(t *testing.T) { func TestEBCDIC1047PrefixersInspect(t *testing.T) { t.Parallel() - require.Equal(t, "EBCDIC.Fixed", EBCDIC1047.Fixed.Inspect()) - require.Equal(t, "EBCDIC.L", EBCDIC1047.L.Inspect()) - require.Equal(t, "EBCDIC.LL", EBCDIC1047.LL.Inspect()) - require.Equal(t, "EBCDIC.LLL", EBCDIC1047.LLL.Inspect()) - require.Equal(t, "EBCDIC.LLLL", EBCDIC1047.LLLL.Inspect()) + require.Equal(t, "EBCDIC1047.Fixed", EBCDIC1047.Fixed.Inspect()) + require.Equal(t, "EBCDIC1047.L", EBCDIC1047.L.Inspect()) + require.Equal(t, "EBCDIC1047.LL", EBCDIC1047.LL.Inspect()) + require.Equal(t, "EBCDIC1047.LLL", EBCDIC1047.LLL.Inspect()) + require.Equal(t, "EBCDIC1047.LLLL", EBCDIC1047.LLLL.Inspect()) }