diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-23 14:15:43 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-23 14:15:43 +0200 |
| commit | d4738888bc71e7aaa45d911b3fc3e3f6905ce9fd (patch) | |
| tree | c2afa69389aa80ecea79ff787085f99439469c38 /internal/file/file_test.go | |
| parent | acb50fbc6f5ea2b97613593c7aea21304f3fb459 (diff) | |
initial unit test
Diffstat (limited to 'internal/file/file_test.go')
| -rw-r--r-- | internal/file/file_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/file/file_test.go b/internal/file/file_test.go new file mode 100644 index 0000000..dc59738 --- /dev/null +++ b/internal/file/file_test.go @@ -0,0 +1,14 @@ +package file + +import ( + "testing" +) + +func TestStringValue(t *testing.T) { + var array [128]byte + copy(array[:], "test string") + + if str := stringValue(array[:]); str != "test string" { + t.Errorf("epxected 'test string' but got '%s' with bytes '%v'", str, []byte(str)) + } +} |
