aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/01-reading.t4
-rw-r--r--t/02-getting.t4
-rw-r--r--t/03-having.t4
-rw-r--r--t/05-null-parser.t2
-rw-r--r--t/07-keys.t17
-rw-r--r--t/08-unsetting.t.t2
-rw-r--r--t/09-cloning.t2
7 files changed, 17 insertions, 18 deletions
diff --git a/t/01-reading.t b/t/01-reading.t
index ba9bd55..2bc6dcd 100644
--- a/t/01-reading.t
+++ b/t/01-reading.t
@@ -11,7 +11,7 @@ use Config::Parser::NULL;
my Config $config = Config.new;
my Config::Parser $null-parser = Config::Parser::NULL;
-throws-like { $config.read('t/files/none'.IO) }, X::Config::FileNotFound, 'Reading nonexisting file';
+throws-like { $config.=read('t/files/none'.IO) }, X::Config::FileNotFound, 'Reading nonexisting file';
my %hash = %(
"a" => "a",
@@ -20,7 +20,7 @@ my %hash = %(
),
);
-$config.read: %hash;
+$config.=read: %hash;
is-deeply $config.get, %hash, 'Correctly sets hash';
diff --git a/t/02-getting.t b/t/02-getting.t
index b7ffbfe..e7e65b8 100644
--- a/t/02-getting.t
+++ b/t/02-getting.t
@@ -7,9 +7,9 @@ plan 13;
use Config;
-my Config $config = Config.new();
+my Config $config = Config.new;
-$config.read({
+$config.=read({
a => "a",
b => {
c => "c"
diff --git a/t/03-having.t b/t/03-having.t
index c1779b0..636c03d 100644
--- a/t/03-having.t
+++ b/t/03-having.t
@@ -7,9 +7,9 @@ plan 4;
use Config;
-my Config $config = Config.new();
+my Config $config = Config.new;
-$config.read({
+$config.=read({
a => "a",
b => {
c => "c"
diff --git a/t/05-null-parser.t b/t/05-null-parser.t
index fc3d4b2..5fafe49 100644
--- a/t/05-null-parser.t
+++ b/t/05-null-parser.t
@@ -17,7 +17,7 @@ Config::Parser::NULL.set-config({
my Config $config = Config.new;
-ok $config.read('t/files/config'.IO, Config::Parser::NULL), "Attempt to read a file with Config::Parser::NULL";
+ok $config.=read('t/files/config'.IO, Config::Parser::NULL), "Attempt to read a file with Config::Parser::NULL";
is-deeply $config.get, {
"a" => "a",
diff --git a/t/07-keys.t b/t/07-keys.t
index 2ba1762..f769dc3 100644
--- a/t/07-keys.t
+++ b/t/07-keys.t
@@ -2,20 +2,19 @@
use v6;
-use Config::Parser::NULL;
use Config;
use Test;
plan 1;
-my Config $c .= new.read: %(
- "a" => False,
- "b" => False,
- "c" => %(
- "a" => False,
- "b" => False,
- ),
-);
+my $c = Config.new.read({
+ a => False,
+ b => False,
+ c => {
+ a => False,
+ b => False,
+ },
+});
my @keys = < a b c.a c.b >;
diff --git a/t/08-unsetting.t.t b/t/08-unsetting.t.t
index a13ef36..78753fc 100644
--- a/t/08-unsetting.t.t
+++ b/t/08-unsetting.t.t
@@ -9,7 +9,7 @@ use Config;
my $config = Config.new;
-$config.read: %(
+$config.=read: %(
a => "b",
c => %(
d => "e",
diff --git a/t/09-cloning.t b/t/09-cloning.t
index 0746eff..5bae887 100644
--- a/t/09-cloning.t
+++ b/t/09-cloning.t
@@ -8,7 +8,7 @@ use Config;
plan 2;
-my Config $a .= new.read: %(
+my $a = Config.new.read: %(
foo => "bar",
baz => 42,
);