aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-03-04 13:15:28 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2017-03-04 13:16:08 +0200
commit7f86dfc65aae2470dfdfbe4bef2a92161c35f193 (patch)
tree4c414e8ebb1971da2e46ec357115510980d8af65 /t
parent14c6474d73fae6aeaa77dd19e10cf5615448aefb (diff)
downloadbeam-7f86dfc65aae2470dfdfbe4bef2a92161c35f193.tar.gz
beam-7f86dfc65aae2470dfdfbe4bef2a92161c35f193.tar.bz2
Always keep locus with each statement; phase out the locations keyword.
Diffstat (limited to 't')
-rw-r--r--t/conf01l.t20
-rw-r--r--t/conf02l.t45
-rw-r--r--t/conf03l.t32
-rw-r--r--t/conf04l.t40
-rw-r--r--t/conf05l.t30
-rw-r--r--t/conf06.t2
6 files changed, 1 insertions, 168 deletions
diff --git a/t/conf01l.t b/t/conf01l.t
deleted file mode 100644
index 0436df0..0000000
--- a/t/conf01l.t
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- perl -*-
-use lib 't';
-use strict;
-use Test;
-use TestConfig;
-
-plan(tests => 1);
-
-my $cfg = new TestConfig(locations => 1);
-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
-
-
diff --git a/t/conf02l.t b/t/conf02l.t
deleted file mode 100644
index da4920a..0000000
--- a/t/conf02l.t
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- perl -*-
-use lib 't';
-use strict;
-use Test;
-use TestConfig;
-
-plan(tests => 7);
-
-my %keywords = (
- core => {
- section => {
- 'retain-interval' => { mandatory => 1 },
- 'tempdir' => 1,
- 'verbose' => 1,
- }
- },
- backend => {
- section => {
- file => 1
- }
- }
-);
-
-my $cfg = new TestConfig(parameters => \%keywords, locations => 1);
-ok($cfg->isset('backend','foo','file'));
-ok($cfg->isvariable('backend','foo','file'));
-ok($cfg->get('backend','foo','file'), 'foo');
-
-ok($cfg->isset('core', 'verbose') == 0);
-
-ok($cfg->issection('backend','foo'));
-
-$cfg->set('core','verbose','On');
-ok($cfg->get('core','verbose'),'On');
-
-$cfg->unset('core','tmpdir');
-ok($cfg->isset('core','tmpdir') == 0);
-
-__DATA__
-# This is a sample configuration file
-[core]
- retain-interval = 10
- tempdir = /tmp
-[backend foo]
- file = foo
diff --git a/t/conf03l.t b/t/conf03l.t
deleted file mode 100644
index ff14596..0000000
--- a/t/conf03l.t
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- perl -*-
-
-use lib 't';
-use strict;
-use Test;
-use TestConfig;
-
-plan(tests => 1);
-
-my %keywords = (
- core => {
- section => {
- 'tempdir' => 1,
- 'verbose' => 1,
- }
- },
- backend => {
- section => {
- file => 1
- }
- }
-);
-my $cfg = new TestConfig(parameters => \%keywords,
- locations => 1,
- expect => [ 'keyword "output" is unknown' ]);
-ok($cfg->errors() == 1);
-__DATA__
-# This is a sample configuration file
-[core]
- tempdir = /tmp
- output = file
-
diff --git a/t/conf04l.t b/t/conf04l.t
deleted file mode 100644
index 1ea5477..0000000
--- a/t/conf04l.t
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- perl -*-
-use lib 't';
-use strict;
-use Test;
-use TestConfig;
-
-plan(tests => 1);
-
-my %keywords = (
- core => {
- section => {
- 'retain-interval' => { mandatory => 1 },
- 'tempdir' => 1,
- 'verbose' => 1,
- }
- },
- backend => {
- section => {
- file => {
- section => {
- name => { mandatory => 1 },
- local => 1
- }
- }
- }
- }
-);
-
-my $cfg = new TestConfig(parameters => \%keywords,
- locations => 1,
- expect => [ 'mandatory variable "core.retain-interval" not set',
- 'mandatory variable "backend.file.name" not set' ]);
-ok($cfg->errors()==2);
-
-__DATA__
-# This is a sample configuration file
-[core]
- tempdir = /tmp
-[backend file]
- local = 1
diff --git a/t/conf05l.t b/t/conf05l.t
deleted file mode 100644
index 11f9cb1..0000000
--- a/t/conf05l.t
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- perl -*-
-use lib 't';
-use strict;
-use Test;
-use TestConfig;
-
-plan(tests => 1);
-
-my %keywords = (
- core => {
- section => {
- list => {
- array => 1
- },
- pidfile => 1
- }
- }
-);
-
-my $cfg = new TestConfig(parameters => \%keywords, locations => 1);
-ok($cfg->canonical(),'core.list=["en","to",5] core.pidfile="file2"');
-
-__END__
-[core]
- list = en
- list = to
- list = 5
-
- pidfile = file1
- pidfile = file2
diff --git a/t/conf06.t b/t/conf06.t
index 219a5e4..af40c24 100644
--- a/t/conf06.t
+++ b/t/conf06.t
@@ -18,7 +18,7 @@ my %keywords = (
'*' => 1
);
-my $cfg = new TestConfig(locations => 1, parameters => \%keywords);
+my $cfg = new TestConfig(parameters => \%keywords);
ok($cfg->canonical, 'backend.file.level=3 backend.file.local=1 core.retain-interval=10 core.tempdir="/tmp"');
my %subkw = (

Return to:

Send suggestions and report system problems to the System administrator.