From 9cc52d83de0b1b09d9b8fe6fa77d922cb2ac1583 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 21 Nov 2016 18:11:11 -0800 Subject: [PATCH] config: test that null characters show up as errors in parse --- config/loader_test.go | 9 +++++++++ config/test-fixtures/git-crypt.tf | Bin 0 -> 13 bytes 2 files changed, 9 insertions(+) create mode 100644 config/test-fixtures/git-crypt.tf diff --git a/config/loader_test.go b/config/loader_test.go index 661be3b58..f7fad33c0 100644 --- a/config/loader_test.go +++ b/config/loader_test.go @@ -49,6 +49,15 @@ func TestLoadFile_badType(t *testing.T) { } } +func TestLoadFile_gitCrypt(t *testing.T) { + _, err := LoadFile(filepath.Join(fixtureDir, "git-crypt.tf")) + if err == nil { + t.Fatal("should have error") + } + + t.Logf("err: %s", err) +} + func TestLoadFile_lifecycleKeyCheck(t *testing.T) { _, err := LoadFile(filepath.Join(fixtureDir, "lifecycle_cbd_typo.tf")) if err == nil { diff --git a/config/test-fixtures/git-crypt.tf b/config/test-fixtures/git-crypt.tf new file mode 100644 index 0000000000000000000000000000000000000000..ecd90886a88b4f7654ce0c6f45160a95597191c9 GIT binary patch literal 13 UcmZQ@_Y83kiVO&0IMl}l02men(EtDd literal 0 HcmV?d00001