aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testdata
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2011-12-01 22:56:23 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2011-12-01 22:56:23 +0000
commit429e46051dba814e7d6c74368eb1bba550222cbe (patch)
treeed1dd43cd23c69f156aae2165006a16a66262cef /tests/testdata
parent58bf1382be0cbcf3f9649286fd2719b789a1595f (diff)
downloadlibconfig-429e46051dba814e7d6c74368eb1bba550222cbe.tar.gz
Imported Upstream version 1.4.8upstream/1.4.8
Diffstat (limited to 'tests/testdata')
-rw-r--r--tests/testdata/bad_input_0.cfg1
-rw-r--r--tests/testdata/bad_input_1.cfg7
-rw-r--r--tests/testdata/input_0.cfg0
-rw-r--r--tests/testdata/input_1.cfg3
-rw-r--r--tests/testdata/input_2.cfg18
-rw-r--r--tests/testdata/input_3.cfg7
-rw-r--r--tests/testdata/input_4.cfg8
-rw-r--r--tests/testdata/input_5.cfg1
-rw-r--r--tests/testdata/more.cfg2
-rw-r--r--tests/testdata/output_0.cfg0
-rw-r--r--tests/testdata/output_1.cfg0
-rw-r--r--tests/testdata/output_2.cfg3
-rw-r--r--tests/testdata/output_3.cfg3
-rw-r--r--tests/testdata/output_4.cfg2
-rw-r--r--tests/testdata/output_5.cfg1
-rw-r--r--tests/testdata/parse_error_0.txt1
-rw-r--r--tests/testdata/parse_error_1.txt1
17 files changed, 58 insertions, 0 deletions
diff --git a/tests/testdata/bad_input_0.cfg b/tests/testdata/bad_input_0.cfg
new file mode 100644
index 0000000..587be6b
--- /dev/null
+++ b/tests/testdata/bad_input_0.cfg
@@ -0,0 +1 @@
+x
diff --git a/tests/testdata/bad_input_1.cfg b/tests/testdata/bad_input_1.cfg
new file mode 100644
index 0000000..ee788b6
--- /dev/null
+++ b/tests/testdata/bad_input_1.cfg
@@ -0,0 +1,7 @@
+
+foo:
+{
+ a = 100;
+ b = 10;
+ a = "hello";
+};
diff --git a/tests/testdata/input_0.cfg b/tests/testdata/input_0.cfg
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/testdata/input_0.cfg
diff --git a/tests/testdata/input_1.cfg b/tests/testdata/input_1.cfg
new file mode 100644
index 0000000..131bb5e
--- /dev/null
+++ b/tests/testdata/input_1.cfg
@@ -0,0 +1,3 @@
+// Empty file
+
+// (no settings, only comments)
diff --git a/tests/testdata/input_2.cfg b/tests/testdata/input_2.cfg
new file mode 100644
index 0000000..e342dca
--- /dev/null
+++ b/tests/testdata/input_2.cfg
@@ -0,0 +1,18 @@
+
+// File with extraneous whitespace.
+
+ foo = 1;
+
+
+
+ bar
+ =
+ "Hello, "
+ "world!"
+;
+
+
+baz = 2;
+
+
+
diff --git a/tests/testdata/input_3.cfg b/tests/testdata/input_3.cfg
new file mode 100644
index 0000000..ce71ad6
--- /dev/null
+++ b/tests/testdata/input_3.cfg
@@ -0,0 +1,7 @@
+// File has no trailing newline.
+
+foo = 1;
+
+bar = 2;
+
+baz = 3; \ No newline at end of file
diff --git a/tests/testdata/input_4.cfg b/tests/testdata/input_4.cfg
new file mode 100644
index 0000000..f803875
--- /dev/null
+++ b/tests/testdata/input_4.cfg
@@ -0,0 +1,8 @@
+// Last line has whitespace but no trailing newline.
+
+foo = 1;
+
+
+bar = 2;
+
+ \ No newline at end of file
diff --git a/tests/testdata/input_5.cfg b/tests/testdata/input_5.cfg
new file mode 100644
index 0000000..777a424
--- /dev/null
+++ b/tests/testdata/input_5.cfg
@@ -0,0 +1 @@
+@include "more.cfg"
diff --git a/tests/testdata/more.cfg b/tests/testdata/more.cfg
new file mode 100644
index 0000000..dad36e1
--- /dev/null
+++ b/tests/testdata/more.cfg
@@ -0,0 +1,2 @@
+
+message = "Hello, world!";
diff --git a/tests/testdata/output_0.cfg b/tests/testdata/output_0.cfg
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/testdata/output_0.cfg
diff --git a/tests/testdata/output_1.cfg b/tests/testdata/output_1.cfg
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/testdata/output_1.cfg
diff --git a/tests/testdata/output_2.cfg b/tests/testdata/output_2.cfg
new file mode 100644
index 0000000..80db4ae
--- /dev/null
+++ b/tests/testdata/output_2.cfg
@@ -0,0 +1,3 @@
+foo = 1;
+bar = "Hello, world!";
+baz = 2;
diff --git a/tests/testdata/output_3.cfg b/tests/testdata/output_3.cfg
new file mode 100644
index 0000000..6a3d003
--- /dev/null
+++ b/tests/testdata/output_3.cfg
@@ -0,0 +1,3 @@
+foo = 1;
+bar = 2;
+baz = 3;
diff --git a/tests/testdata/output_4.cfg b/tests/testdata/output_4.cfg
new file mode 100644
index 0000000..78abe90
--- /dev/null
+++ b/tests/testdata/output_4.cfg
@@ -0,0 +1,2 @@
+foo = 1;
+bar = 2;
diff --git a/tests/testdata/output_5.cfg b/tests/testdata/output_5.cfg
new file mode 100644
index 0000000..25817c4
--- /dev/null
+++ b/tests/testdata/output_5.cfg
@@ -0,0 +1 @@
+message = "Hello, world!";
diff --git a/tests/testdata/parse_error_0.txt b/tests/testdata/parse_error_0.txt
new file mode 100644
index 0000000..dd4f68c
--- /dev/null
+++ b/tests/testdata/parse_error_0.txt
@@ -0,0 +1 @@
+2 syntax error
diff --git a/tests/testdata/parse_error_1.txt b/tests/testdata/parse_error_1.txt
new file mode 100644
index 0000000..ce70b88
--- /dev/null
+++ b/tests/testdata/parse_error_1.txt
@@ -0,0 +1 @@
+6 duplicate setting name