@@ -22,36 +22,36 @@ $t.test(‘basic test’,
22
22
: 150 timeout);
23
23
24
24
$ t . test-gist(‘ lots of results’ ,
25
- % (‘ result’ => { . lines > 390 }));
25
+ % (‘ result-#perl6.md ’ => { 370 < . lines < 10_000 }));
26
26
27
27
$ t . test-gist(‘ all lines match our regex’ ,
28
- % (‘ result’ => { so . lines . all . starts-with (‘ bisect:’ ) }));
28
+ % (‘ result-#perl6.md ’ => { so . lines . all . starts-with (‘ [` bisect:’ ) }));
29
29
30
30
31
31
$ t . test(‘ invalid regex’ ,
32
32
“ { $ t . bot-nick} : ‘foo” ,
33
33
/^ <me ($ t )>‘, OK, working on it! This may take up to three minutes (’ \d + ‘ messages to process)’ $ /,
34
34
“ { $ t . our-nick} , https://whatever.able/fakeupload” );
35
35
36
- $ t . test-gist(‘ lots of results ’ ,
36
+ $ t . test-gist(‘ error message gisted ’ ,
37
37
% (‘ result’ => /^ ‘===SORRY!=== Error while compiling’ /));
38
38
39
-
40
39
# Non-bot tests
41
- todo ‘ outdated data (issue #192)’ , 2 ;
42
40
subtest ‘ all channels have recent data’ , {
43
41
my @ tracked-channels = dir ‘ data/irc’ , test => { . starts-with (‘ #’ ) && “ data/irc/$ _” . IO . d };
44
42
ok @ tracked-channels > 0 , ‘ at least one channel is tracked’ ;
45
43
for @ tracked-channels {
44
+ dd $ _ ;
46
45
my $ exists = “ $ _ /{ DateTime . now. earlier(: 2 days). Date } ” . IO . e ;
46
+ todo ‘ outdated data (issue #192)’ , 3 ;
47
47
ok $ exists , “ { . basename } is up-to-date (or was up-to-date 2 days ago)” ;
48
+ cmp-ok “ $ _ .cache” . IO . modified. DateTime , &[> ], DateTime . now. earlier(: 2 days),
49
+ “ $ _ cache file was recently updated” ;
50
+ cmp-ok “ $ _ .total” . IO . modified. DateTime , &[> ], DateTime . now. earlier(: 2 days),
51
+ “ $ _ cache file was recently updated” ;
48
52
}
49
53
}
50
54
51
- cmp-ok ‘ data/irc/cache’ . IO . modified. DateTime , &[> ], DateTime . now. earlier(: 2 days),
52
- ‘ cache file was recently updated’ ;
53
-
54
-
55
55
$ t . last-test;
56
56
done-testing ;
57
57
END $ t . end ;
0 commit comments