summaryrefslogtreecommitdiff
path: root/specsuite
diff options
context:
space:
mode:
authorMartin Atkins <mart@degeneration.co.uk>2018-08-10 08:51:51 -0700
committerMartin Atkins <mart@degeneration.co.uk>2018-08-10 08:51:51 -0700
commitdb04b3dffe677ece1c78a2ae87ab1ebf0bfb54ca (patch)
tree7649008671d96b8ed5ac4a560faa711de2272e26 /specsuite
parent48039c0368f075eb495ed52dbf05ef2b1e3d7854 (diff)
specsuites: Tests for comment parsing
Diffstat (limited to 'specsuite')
-rw-r--r--specsuite/tests/comments/hash_comment.hcl1
-rw-r--r--specsuite/tests/comments/hash_comment.hcldec3
-rw-r--r--specsuite/tests/comments/hash_comment.t4
-rw-r--r--specsuite/tests/comments/multiline_comment.hcl3
-rw-r--r--specsuite/tests/comments/multiline_comment.hcldec3
-rw-r--r--specsuite/tests/comments/multiline_comment.t4
-rw-r--r--specsuite/tests/comments/slash_comment.hcl1
-rw-r--r--specsuite/tests/comments/slash_comment.hcldec3
-rw-r--r--specsuite/tests/comments/slash_comment.t4
9 files changed, 26 insertions, 0 deletions
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"