aboutsummaryrefslogtreecommitdiff
path: root/t/05-null-parser.t
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2017-04-26 23:08:59 +0200
committerPatrick Spek <p.spek@tyil.nl>2017-04-26 23:08:59 +0200
commited219a26574e05ba27264d73e75e5690e478570f (patch)
treefafb21c1c9db6f543fb213c9d658e5f91f027788 /t/05-null-parser.t
parent845c2d891e12b7abe006aa1e36c1201266b29a51 (diff)
Add Config::Parser::NULL for testcases
Diffstat (limited to 't/05-null-parser.t')
-rw-r--r--t/05-null-parser.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/05-null-parser.t b/t/05-null-parser.t
new file mode 100644
index 0000000..97e897f
--- /dev/null
+++ b/t/05-null-parser.t
@@ -0,0 +1,30 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+use Test;
+use lib "lib";
+
+use Config;
+use Config::Parser::NULL;
+
+plan 3;
+
+::("Config::Parser::NULL").set-config({
+ "a" => "a",
+ "b" => {
+ "c" => "c"
+ }
+});
+
+my $config = Config.new();
+
+ok $config.read("t/files/config", "Config::Parser::NULL"), "Attempt to read a file with Config::Parser::NULL";
+
+is-deeply $config.get(), {
+ "a" => "a",
+ "b" => {
+ "c" => "c"
+ }
+}, "Check read config from Config::Parser::NULL";
+
+ok $config.write("t/t/t"), "Attempt to write a file with Config::Parser::NULL";