diff options
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)) + } +} |
