From b752906d1581bddf3fa9adc173257ff3d4ef11a5 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 18 Nov 2018 21:56:50 +0100 Subject: [PATCH] add minimal test to test ANY lines in bash decoder/encoder --- internal/cnf/bash_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cnf/bash_test.go b/internal/cnf/bash_test.go index 5ab3586..c7097a2 100644 --- a/internal/cnf/bash_test.go +++ b/internal/cnf/bash_test.go @@ -165,6 +165,7 @@ func TestBashSetCreateEncode(t *testing.T) { encoded string }{ {"ignore=xxx;\n", "key", `"newvalue"`, "ignore=xxx;\nkey=\"newvalue\";\n"}, + {"#!/bin/bash\n\nfunc(){\n\techo \"something\";\n}\nignore=xxx;\n", "key", `"newvalue"`, "#!/bin/bash\nfunc(){\n\techo \"something\";\n}\nignore=xxx;\nkey=\"newvalue\";\n"}, } for i, test := range tests {