mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-10 00:08:48 +00:00
fixed another footway variant
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@88 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
da68809adc
commit
d7c3ba543a
2 changed files with 42 additions and 2 deletions
|
@ -365,9 +365,9 @@ public class MvvProvider implements NetworkProvider
|
|||
+ "<td>\\s*(.*?)\\s*<br />Richtung\\s*(.*?)\\s*</td>.*?" //
|
||||
+ "an (\\d+:\\d+)\\s+(.*?)\\s*<" //
|
||||
+ "|" //
|
||||
+ "ab\\s+(.*?)\\s*<a.*?" //
|
||||
+ "ab\\s+(.*?)\\s*<.*?" //
|
||||
+ "Fußweg[\\xa0\\s]+\\(ca\\.[\\xa0\\s]+(\\d+)[\\xa0\\s]+Minute.*?" //
|
||||
+ "an\\s+(.*?)\\s*<a" //
|
||||
+ "an\\s+(.*?)\\s*<" //
|
||||
+ ").*?", Pattern.DOTALL);
|
||||
private static final Pattern P_CONNECTION_DETAILS_ERRORS = Pattern.compile("(session has expired)", Pattern.CASE_INSENSITIVE);
|
||||
private static final String SITZENBLEIBER = "Sitzenbleiber";
|
||||
|
|
|
@ -84,6 +84,46 @@ public class MvvProviderTest
|
|||
+ "</td>\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void footway()
|
||||
{
|
||||
assertFineConnectionDetails("\n" //
|
||||
+ "<td colspan=\"4\">ab München Infanteriestraße 7 <a class=\"imgLink\" href=\"XSLT_TRIP_REQUEST2?language=de&tripSelector5=on&sessionID=MVV2_3994525266&requestID=1&tripSelection=on&itdLPxx_view=map_5&itdLPxx_img=FILELOAD?Filename=mvv2_4C6916821.png&itdLPxx_partialRoute=1&imageFormat=PNG&imageWidth=400&imageHeight=300&imageOnly=1&imageNoTiles=1&itdLPxx_usage=departure\"><img src=\"images/pdf.gif\" border=\"0\" alt=\"Karte\" /></a>\n" //
|
||||
+ "<br />\n" //
|
||||
+ "</td>\n" //
|
||||
+ "\n" //
|
||||
+ "<td width=\"15\" valign=\"middle\">\n" //
|
||||
+ "<img src=\"images/means/fuss.gif\" alt=\"Fussweg\" />\n" //
|
||||
+ "</td>\n" //
|
||||
+ "<td width=\"1\" valign=\"middle\" />\n" //
|
||||
+ "<td>Fußweg\n" //
|
||||
+ " (ca. 3 Minuten)\n" //
|
||||
+ " </td>\n" //
|
||||
+ "<td width=\"1\"> </td>\n" //
|
||||
+ "\n" //
|
||||
+ "<td colspan=\"4\">an Infanteriestraße Süd <a class=\"imgLink\" href=\"XSLT_TRIP_REQUEST2?language=de&tripSelector5=on&sessionID=MVV2_3994525266&requestID=1&tripSelection=on&itdLPxx_view=map_5&itdLPxx_img=FILELOAD?Filename=mvv2_4C6916822.png&itdLPxx_partialRoute=1&imageFormat=PNG&imageWidth=400&imageHeight=300&imageOnly=1&imageNoTiles=1&command=nop&itdLPxx_usage=arrival\"><img src=\"images/pdf.gif\" border=\"0\" alt=\"Karte\" /></a>\n" //
|
||||
+ "</td>\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void footway2()
|
||||
{
|
||||
assertFineConnectionDetails("\n" //
|
||||
+ "<td colspan=\"4\">ab Weimar Gleis 1<br />\n" //
|
||||
+ "</td>\n" //
|
||||
+ "\n" //
|
||||
+ "<td width=\"15\" valign=\"middle\">\n" //
|
||||
+ "<img src=\"images/means/fuss.gif\" alt=\"Fussweg\" />\n" //
|
||||
+ "</td>\n" //
|
||||
+ "<td width=\"1\" valign=\"middle\" />\n" //
|
||||
+ "<td>Fußweg\n" //
|
||||
+ "(ca. 2 Minuten)\n" //
|
||||
+ "</td>\n" //
|
||||
+ "<td width=\"1\"> </td>\n" //
|
||||
+ "\n" //
|
||||
+ "<td colspan=\"4\">an Weimar Gleis 2</td>\n");
|
||||
}
|
||||
|
||||
private void assertFineConnectionDetails(String s)
|
||||
{
|
||||
Matcher m = MvvProvider.P_CONNECTION_DETAILS_FINE.matcher(s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue