aboutsummaryrefslogtreecommitdiff
path: root/t/reading.t
blob: 52859af3f6c98b96195d1d8be584dcfbe064867e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/env perl6

use v6.c;
use Test;
use lib "lib";

plan 3;

use Config;

my $config = Config.new();

throws-like { $config.read("nonexistant-config") }, Config::Exception::FileNotFoundException, "Reading nonexisting file";
throws-like { $config.read("t/test-stub") }, Config::Exception::UnknownTypeException, "Reading file of unknown type";
throws-like { $config.read("t/test-stub", "Config::Parser:NoSuchParserForTest") }, Config::Exception::MissingParserException, "Using non-existing parser";