@@ -26,34 +26,44 @@ Some text
26
26
=end pod
27
27
POD-CONTENT
28
28
29
- $ cache .= new ( : source( DOC ), : path( REP ), :! verbose);
30
- $ cache . update-cache;
31
-
32
- # --MARKER-- Test 1
33
- ok $ cache . pod(' a-pod-file' )[0 ] ~~ Pod ::Block::Named, ' pod is returned from cache' ;
34
-
35
-
36
29
(DOC ~ ' /a-second-pod-file.pod6' ). IO . spurt (q :to /POD-CONTENT /);
37
30
=begin pod
38
31
=TITLE More and more
39
32
40
33
Some extra changed text but now it is changed
41
34
42
35
=end pod
43
- POD-CONTENT
36
+ POD-CONTENT
37
+
38
+ $ cache .= new ( : source( DOC ), : path( REP ), :! verbose);
39
+ $ cache . update-cache;
40
+
41
+ # --MARKER-- Test 1
42
+ ok $ cache . pod(' a-pod-file' )[0 ] ~~ Pod ::Block::Named, ' pod is returned from cache' ;
44
43
45
44
$ cache .= new (: path( REP ));
46
45
my % h = $ cache . hash-files;
47
46
# --MARKER-- Test 2
48
- is % h <a-second-pod-file >, ' Valid' , ' The old version is still in cache, no update-cache' ;
47
+ is % h <a-second-pod-file >, ' Current' , ' The old version is still in cache, no
48
+ update-cache' ;
49
49
# --MARKER-- Test 3
50
50
lives-ok { $ rv = $ cache . pod(' a-second-pod-file' ) }, ' Old Pod is provided' ;
51
51
52
52
# --MARKER-- Test 4
53
53
like $ rv [0 ]. contents[1 ]. contents[0 ],
54
- /'Some more text but now it is changed' /,
54
+ /'Some extra changed' /,
55
55
' previous text in source' ;
56
56
57
+ (DOC ~ ' /a-second-pod-file.pod6' ). IO . spurt (q :to /POD-CONTENT /);
58
+ =begin pod
59
+ =TITLE More and more
60
+
61
+ Some more text but now it is changed
62
+
63
+ =end pod
64
+ POD-CONTENT
65
+ $ cache .= new (: source( DOC ), : path( REP ));
66
+
57
67
diag ' testing freeze' ;
58
68
# --MARKER-- Test 5
59
69
throws-like { $ cache . freeze }, Exception ,
@@ -64,6 +74,7 @@ throws-like { $cache.freeze }, Exception,
64
74
ok $ cache . update-cache, ' updates without problem' ;
65
75
66
76
# --MARKER-- Test 7
77
+ say $ cache . pod(' a-second-pod-file' )[0 ];
67
78
like $ cache . pod(' a-second-pod-file' )[0 ]. contents[1 ]. contents[0 ],
68
79
/'Some more text but now it is changed' /,
69
80
' new version after update' ;
0 commit comments