diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-03-03 14:12:42 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-03-03 14:12:42 +0200 |
commit | 14c6474d73fae6aeaa77dd19e10cf5615448aefb (patch) | |
tree | f887ea9cac45d395a6337bb7954482f41a8a667e /t | |
parent | 8fbdd4a7c56de2752c866ce3283d3bdbca3ed8bb (diff) | |
download | beam-14c6474d73fae6aeaa77dd19e10cf5615448aefb.tar.gz beam-14c6474d73fae6aeaa77dd19e10cf5615448aefb.tar.bz2 |
Locus: correctly handle uninitialized locations
Diffstat (limited to 't')
-rw-r--r-- | t/locus.t | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3,9 +3,12 @@ use strict; use Test; use App::Beam::Config::Locus; -plan(tests => 7); +plan(tests => 10); my $loc = new App::Beam::Config::Locus; +ok($loc->format, ''); +ok($loc->format('test', 'message'), 'test message'); + $loc->add('foo', 10); ok($loc->format, "foo:10"); @@ -17,6 +20,7 @@ ok($loc->format, "foo:10-13"); $loc->add('foo', 24); $loc->add('foo', 28); ok($loc->format, "foo:10-13,24,28"); +ok($loc->format('test', 'message'), "foo:10-13,24,28: test message"); $loc->add('bar', 1); $loc->add('baz', 8); |