aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2017-04-24 08:07:20 +0200
committerPatrick Spek <p.spek@tyil.nl>2017-04-24 08:07:20 +0200
commitc1dc65009e381ab09f15bb73529491d427d77232 (patch)
tree8ccaf2da3cf0f0f70b946521f830a54a941d0cf3
parenta5c9ad058898d4467cdc6993a9c1b3b1a096935f (diff)
downloadconfig-parser-yaml-c1dc65009e381ab09f15bb73529491d427d77232.tar.gz
config-parser-yaml-c1dc65009e381ab09f15bb73529491d427d77232.tar.bz2
Add Travis checks
-rw-r--r--.travis.yml14
-rw-r--r--README.md9
-rw-r--r--t/read.t11
3 files changed, 29 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..5558152
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,14 @@
+language: perl6
+
+perl6:
+ - nom
+ - latest
+
+os:
+ - linux
+
+install:
+ - rakudobrew build zef
+ - zef install --depsonly .
+
+script: AUTHOR_TESTING=1 prove -v -e "perl6 -Ilib" t/
diff --git a/README.md b/README.md
index 6c69d0d..0b15ba3 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
# Config::Parser::yaml
-A YAML parser for Config.
+A YAML parser for [Config](https://github.com/scriptkitties/p6-Config).
+
+[![Build Status](https://travis-ci.org/scriptkitties/p6-Config-Parser-yaml.svg?branch=master)](https://travis-ci.org/scriptkitties/p6-Config-Parser-yaml)
+
+## Installation
+```sh
+zef install Config::Parser::yaml
+```
## License
This program is free software: you can redistribute it and/or modify it under
diff --git a/t/read.t b/t/read.t
index a65e6e8..7a2c0f7 100644
--- a/t/read.t
+++ b/t/read.t
@@ -6,10 +6,13 @@ use lib "lib";
use Config;
-plan 3;
+plan 5;
my $config = Config.new();
-ok $config.read("t/test.yaml");
-ok $config.get("a") eq "a";
-ok $config.get("b.c") eq "c";
+ok $config.read("t/test.yaml"), "Read a YAML file";
+
+ok $config.get("a") eq "a", "Get simple key";
+ok $config.get("b.c") eq "c", "Get nested key";
+ok $config.get("nonexistant") === Nil, "Get nonexistant key";
+ok $config.get("nonexistant", "test") === "test", "Get nonexistant key with default";