From d0260a3181a2e9740e99744e16a61862abdb0fbf Mon Sep 17 00:00:00 2001 From: lordwelch Date: Mon, 21 Dec 2020 12:11:44 -0800 Subject: [PATCH] Add test for null byte --- pathvalidate_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pathvalidate_test.go b/pathvalidate_test.go index 7a91500..3dee947 100644 --- a/pathvalidate_test.go +++ b/pathvalidate_test.go @@ -15,6 +15,7 @@ var tests = []struct { {"hello\t", "hello_", pathvalidate.ErrInvalidChar}, {"hello\r", "hello_", pathvalidate.ErrInvalidChar}, {"hello\n", "hello_", pathvalidate.ErrInvalidChar}, + {"hello\x00", "hello_", pathvalidate.ErrInvalidChar}, {"hello ", "hello", pathvalidate.ErrInvalidChar}, {"hello/world", "hello_world", pathvalidate.ErrInvalidChar}, {"nul", "nul_", pathvalidate.ErrReservedWord},