aboutsummaryrefslogtreecommitdiff
path: root/t/conf01.t
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-02-16 14:28:01 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2017-02-16 16:08:43 +0200
commite547b7507e6878efdccb744b7d6cd5250c6c69b9 (patch)
tree89bba96184b32d831e06bafb8ed38bd376cb92e7 /t/conf01.t
parent0cd31637a354ba5c0171a5f4ce8243f12739fda4 (diff)
downloadbeam-e547b7507e6878efdccb744b7d6cd5250c6c69b9.tar.gz
beam-e547b7507e6878efdccb744b7d6cd5250c6c69b9.tar.bz2
Improve config parser. Add more tests.
* MANIFEST: Update. * lib/App/Beam/Config.pm: Rewrite 'error' as method. Check for missing mandatory statements. * t/TestConfig.pm: New file. * t/conf01.t: New file. * t/conf02.t: New file. * t/conf03.t: New file. * t/config.t: Remove. * t/f.conf: Remove.
Diffstat (limited to 't/conf01.t')
-rw-r--r--t/conf01.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/conf01.t b/t/conf01.t
new file mode 100644
index 0000000..f1d1476
--- /dev/null
+++ b/t/conf01.t
@@ -0,0 +1,20 @@
+# -*- perl -*-
+use lib 't';
+use strict;
+use Test;
+use TestConfig;
+
+plan(tests => 1);
+
+my $cfg = new TestConfig;
+ok($cfg->canonical, 'backend.foo.file="a" core.retain-interval=10 core.tempdir="/tmp"');
+
+__DATA__
+# This is a sample configuration file
+[core]
+ retain-interval = 10
+ tempdir = /tmp
+[backend foo]
+ file = a
+
+

Return to:

Send suggestions and report system problems to the System administrator.