From db04b3dffe677ece1c78a2ae87ab1ebf0bfb54ca Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 10 Aug 2018 08:51:51 -0700 Subject: [PATCH] specsuites: Tests for comment parsing --- specsuite/tests/comments/hash_comment.hcl | 1 + specsuite/tests/comments/hash_comment.hcldec | 3 +++ specsuite/tests/comments/hash_comment.t | 4 ++++ specsuite/tests/comments/multiline_comment.hcl | 3 +++ specsuite/tests/comments/multiline_comment.hcldec | 3 +++ specsuite/tests/comments/multiline_comment.t | 4 ++++ specsuite/tests/comments/slash_comment.hcl | 1 + specsuite/tests/comments/slash_comment.hcldec | 3 +++ specsuite/tests/comments/slash_comment.t | 4 ++++ 9 files changed, 26 insertions(+) create mode 100644 specsuite/tests/comments/hash_comment.hcl create mode 100644 specsuite/tests/comments/hash_comment.hcldec create mode 100644 specsuite/tests/comments/hash_comment.t create mode 100644 specsuite/tests/comments/multiline_comment.hcl create mode 100644 specsuite/tests/comments/multiline_comment.hcldec create mode 100644 specsuite/tests/comments/multiline_comment.t create mode 100644 specsuite/tests/comments/slash_comment.hcl create mode 100644 specsuite/tests/comments/slash_comment.hcldec create mode 100644 specsuite/tests/comments/slash_comment.t diff --git a/specsuite/tests/comments/hash_comment.hcl b/specsuite/tests/comments/hash_comment.hcl new file mode 100644 index 0000000..d2be9c1 --- /dev/null +++ b/specsuite/tests/comments/hash_comment.hcl @@ -0,0 +1 @@ +# Hash comment diff --git a/specsuite/tests/comments/hash_comment.hcldec b/specsuite/tests/comments/hash_comment.hcldec new file mode 100644 index 0000000..0b26ee8 --- /dev/null +++ b/specsuite/tests/comments/hash_comment.hcldec @@ -0,0 +1,3 @@ +literal { + value = "ok" +} diff --git a/specsuite/tests/comments/hash_comment.t b/specsuite/tests/comments/hash_comment.t new file mode 100644 index 0000000..2e5e185 --- /dev/null +++ b/specsuite/tests/comments/hash_comment.t @@ -0,0 +1,4 @@ +# This test parses a file containing only a comment. It is a parsing-only test, +# so the hcldec spec for this test is just a literal value given below. + +result = "ok" diff --git a/specsuite/tests/comments/multiline_comment.hcl b/specsuite/tests/comments/multiline_comment.hcl new file mode 100644 index 0000000..c118d4a --- /dev/null +++ b/specsuite/tests/comments/multiline_comment.hcl @@ -0,0 +1,3 @@ +/* + Multi-line comment +*/ diff --git a/specsuite/tests/comments/multiline_comment.hcldec b/specsuite/tests/comments/multiline_comment.hcldec new file mode 100644 index 0000000..0b26ee8 --- /dev/null +++ b/specsuite/tests/comments/multiline_comment.hcldec @@ -0,0 +1,3 @@ +literal { + value = "ok" +} diff --git a/specsuite/tests/comments/multiline_comment.t b/specsuite/tests/comments/multiline_comment.t new file mode 100644 index 0000000..2e5e185 --- /dev/null +++ b/specsuite/tests/comments/multiline_comment.t @@ -0,0 +1,4 @@ +# This test parses a file containing only a comment. It is a parsing-only test, +# so the hcldec spec for this test is just a literal value given below. + +result = "ok" diff --git a/specsuite/tests/comments/slash_comment.hcl b/specsuite/tests/comments/slash_comment.hcl new file mode 100644 index 0000000..cbb293d --- /dev/null +++ b/specsuite/tests/comments/slash_comment.hcl @@ -0,0 +1 @@ +// Slash comment diff --git a/specsuite/tests/comments/slash_comment.hcldec b/specsuite/tests/comments/slash_comment.hcldec new file mode 100644 index 0000000..0b26ee8 --- /dev/null +++ b/specsuite/tests/comments/slash_comment.hcldec @@ -0,0 +1,3 @@ +literal { + value = "ok" +} diff --git a/specsuite/tests/comments/slash_comment.t b/specsuite/tests/comments/slash_comment.t new file mode 100644 index 0000000..2e5e185 --- /dev/null +++ b/specsuite/tests/comments/slash_comment.t @@ -0,0 +1,4 @@ +# This test parses a file containing only a comment. It is a parsing-only test, +# so the hcldec spec for this test is just a literal value given below. + +result = "ok"