]> git.pond.sub.org Git - empserver/commitdiff
tests/smoke: Run news
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Jun 2016 05:05:54 +0000 (07:05 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:17 +0000 (20:09 +0200)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
tests/normalize.pl
tests/smoke/15/08-8
tests/smoke/journal.log

index 06a4e029cbe4ed13705d5c7b573cbf6acabc8347..734604c5bb3518c94d29a0750fe95c6e10c0e554 100755 (executable)
@@ -15,11 +15,13 @@ die "$0: either -j or -s, not both\n"
 
 my $dow_re = qr/(Sun|Mon|Tue|Wed|Thu|Fri|Sat)/;
 my $mon_re = qr/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/;
-my $tod_re = qr/[0-2][0-9]:[0-5][0-9]:[0-6][0-9]/;
+my $hm_re = qr/[0-2][0-9]:[0-5][0-9]/;
+my $hms_re = qr/$hm_re:[0-6][0-9]/;
 my $year_re = qr/[0-9][0-9][0-9][0-9]/;
-my $ctime19_re = qr/$dow_re $mon_re [ 123][0-9] $tod_re/;
-my $ctime_re = qr/$dow_re $mon_re [ 123][0-9] $tod_re $year_re/;
-my $fmttime2822_re = qr/$dow_re, [0123][0-9] $mon_re $year_re $tod_re [-+][0-9][0-9][0-9][0-9]/;
+my $ctime16_re = qr/$dow_re $mon_re [ 123][0-9] $hm_re/;
+my $ctime19_re = qr/$dow_re $mon_re [ 123][0-9] $hms_re/;
+my $ctime_re = qr/$dow_re $mon_re [ 123][0-9] $hms_re $year_re/;
+my $fmttime2822_re = qr/$dow_re, [0123][0-9] $mon_re $year_re $hms_re [-+][0-9][0-9][0-9][0-9]/;
 my $xdfld_re = qr/\([^)]*\)|[^ (][^ ]*/;
 
 # Current dump, if any
@@ -32,6 +34,7 @@ sub norm_ctime {
     my ($s) = @_;
     $s =~ s/$ctime_re/Thu Jan  1 00:00:00 1970/g;
     $s =~ s/$ctime19_re/Thu Jan  1 00:00:00/g;
+    $s =~ s/$ctime16_re/Thu Jan  1 00:00/g;
     $s =~ s/$fmttime2822_re/Thu, 01 Jan 1970 00:00:00 +0000/g;
     return $s;
 }
index 51547c04e55c61b9542e5a8e0b06a57bc97dde7c..c0b34ed5810c46e95d8026efc4c20b1bb057f871 100644 (file)
@@ -1,3 +1,5 @@
+news
+__cmd added 1 0 0
 des 5,-1 d
 thres g 5,-1 1
 des -6,-4 f
index 08a8d0b729da91247c3303506181f7fbca9fb2f7..809ef4973ea421606b145dca8da154d50e936522 100644 (file)
     Play#8 output Play#8 1 *** If you see this in a game, it is misconfigured! ***
     Play#8 output Play#8 1 You have a new telegram waiting ...
     Play#8 output Play#8 6 0 640
+    Play#8 input news
+    Play#8 command newspaper
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1         -=[  EMPIRE NEWS  ]=-
+    Play#8 output Play#8 1 ::::::::::::::::::::::::::::::::::::::::::::::::::
+    Play#8 output Play#8 1 !       "All the news that fits, we print."      !
+    Play#8 output Play#8 1 ::::::::::::::::::::::::::::::::::::::::::::::::::
+    Play#8 output Play#8 1        Thu Jan  1 00:00:00 1970
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1 Relative calm prevails.
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1 The details of Empire news since Thu Jan  1 00:00:00 1970
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1      ===  Foreign Affairs  ===
+    Play#8 output Play#8 1 Thu Jan  1 00:00  1 no longer has a sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  2 no longer has a sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  3 breaks sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  4 no longer has a sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  5 breaks sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  6 breaks sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  7 breaks sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  8 breaks sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  9 no longer has a sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  10 no longer has a sanctuary
+    Play#8 output Play#8 1 Thu Jan  1 00:00  1 gets serious with 8 and declares WAR
+    Play#8 output Play#8 1 Thu Jan  1 00:00  1 announces an alliance with 2
+    Play#8 output Play#8 1 Thu Jan  1 00:00  2 / 1 alliance declared
+    Play#8 output Play#8 1 Thu Jan  1 00:00  2 is suspicious that 8 has hostile intentions
+    Play#8 output Play#8 1 Thu Jan  1 00:00  8 declares TOTAL WAR on 1
+    Play#8 output Play#8 1 Thu Jan  1 00:00  8 downgrades relations with 2 to hostile
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1      ===  The Front Line  ===
+    Play#8 output Play#8 1 Thu Jan  1 00:00  1 sailors take a coastal sector from 8
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1      ===  The Home Front  ===
+    Play#8 output Play#8 1 Thu Jan  1 00:00  8 underground rises up against 1 occupation two times
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1      ===  Telecommunications  ===
+    Play#8 output Play#8 1 Thu Jan  1 00:00  1 sends a telegram to 2
+    Play#8 output Play#8 1
+    Play#8 output Play#8 1      ===  The Bottom Line   ==
+    Play#8 output Play#8 1 1 stole one sector from 8
+    Play#8 output Play#8 6 0 640
+    Play#8 input __cmd added 1 0 0
+    Play#8 command __cmd
+    Play#8 output Play#8 6 0 640
     Play#8 input des 5,-1 d
     Play#8 command designate
     Play#8 output Play#8 6 0 639