Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
366fb9569e |
4 changed files with 7 additions and 29 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,4 +1 @@
|
||||||
bayernfahrplan*
|
/bayernfahrplan
|
||||||
.dub/*
|
|
||||||
replacement.txt
|
|
||||||
dub.selections.json
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
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.5.3",
|
"requests": "~>0.4.1",
|
||||||
"kxml": "~>1.0.1"
|
"kxml": "~>1.0.1"
|
||||||
},
|
},
|
||||||
"description": "A minimal D application.",
|
"description": "A minimal D application.",
|
||||||
"copyright": "Copyright © 2017, Johannes Loher",
|
"copyright": "Copyright © 2016, Johannes Loher",
|
||||||
"license": "MIT"
|
"license": "proprietary"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
assert(xml.delay == dur!"seconds"(0));
|
assertThrown!AssertError(xml.delay);
|
||||||
|
|
||||||
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;
|
||||||
assert(xml.delay == dur!"seconds"(0));
|
assertThrown!AssertError(xml.delay);
|
||||||
|
|
||||||
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