Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
892378f55f | |||
6ad2048907 | |||
e85289fe53 | |||
18de7f6998 | |||
8905e7084f | |||
4f40ff7712 | |||
7ce5a3b095 | |||
7cf2592ff2 |
4 changed files with 29 additions and 7 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
/bayernfahrplan
|
bayernfahrplan*
|
||||||
|
.dub/*
|
||||||
|
replacement.txt
|
||||||
|
dub.selections.json
|
||||||
|
|
19
.gitlab-ci.yml
Normal file
19
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
image: base/devel
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- pacman -Sy
|
||||||
|
- pacman --noconfirm -S ldc dub libevent
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- dub build --compiler=ldc2
|
||||||
|
|
||||||
|
test:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- dub test --compiler=ldc2
|
6
dub.json
6
dub.json
|
@ -5,10 +5,10 @@
|
||||||
"Oliver Rümpelein"
|
"Oliver Rümpelein"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"requests": "~>0.4.1",
|
"requests": "0.5.3",
|
||||||
"kxml": "~>1.0.1"
|
"kxml": "~>1.0.1"
|
||||||
},
|
},
|
||||||
"description": "A minimal D application.",
|
"description": "A minimal D application.",
|
||||||
"copyright": "Copyright © 2016, Johannes Loher",
|
"copyright": "Copyright © 2017, Johannes Loher",
|
||||||
"license": "proprietary"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ in
|
||||||
body
|
body
|
||||||
{
|
{
|
||||||
auto timeNodes = dp.parseXPath(timeXPath!_timeNodeName);
|
auto timeNodes = dp.parseXPath(timeXPath!_timeNodeName);
|
||||||
if(timeNodes.empty)
|
if (timeNodes.empty)
|
||||||
throw new CouldNotFindeNodeException(_timeNodeName);
|
throw new CouldNotFindeNodeException(_timeNodeName);
|
||||||
|
|
||||||
return TimeOfDay.fromISOString(timeNodes.front.getCData ~ "00");
|
return TimeOfDay.fromISOString(timeNodes.front.getCData ~ "00");
|
||||||
|
@ -189,13 +189,13 @@ body
|
||||||
assertThrown!(UnexpectedValueException!string)(xml.delay);
|
assertThrown!(UnexpectedValueException!string)(xml.delay);
|
||||||
|
|
||||||
xml = "<dp><realtime>1</realtime></dp>".readDocument.parseXPath("/dp").front;
|
xml = "<dp><realtime>1</realtime></dp>".readDocument.parseXPath("/dp").front;
|
||||||
assertThrown!AssertError(xml.delay);
|
assert(xml.delay == dur!"seconds"(0));
|
||||||
|
|
||||||
xml = "<dp><realtime>1</realtime><st><t></t></st></dp>".readDocument.parseXPath("/dp").front;
|
xml = "<dp><realtime>1</realtime><st><t></t></st></dp>".readDocument.parseXPath("/dp").front;
|
||||||
assertThrown!DateTimeException(xml.delay);
|
assertThrown!DateTimeException(xml.delay);
|
||||||
|
|
||||||
xml = "<dp><realtime>1</realtime><st><rt></rt></st></dp>".readDocument.parseXPath("/dp").front;
|
xml = "<dp><realtime>1</realtime><st><rt></rt></st></dp>".readDocument.parseXPath("/dp").front;
|
||||||
assertThrown!AssertError(xml.delay);
|
assert(xml.delay == dur!"seconds"(0));
|
||||||
|
|
||||||
xml = "<dp><st><rt></rt><t></t></st></dp>".readDocument.parseXPath("/dp").front;
|
xml = "<dp><st><rt></rt><t></t></st></dp>".readDocument.parseXPath("/dp").front;
|
||||||
assertThrown!AssertError(xml.delay);
|
assertThrown!AssertError(xml.delay);
|
||||||
|
|
Loading…
Reference in a new issue