Skip to content

Commit c155d4e

Browse files
committed
Testing #16
Text does not update
1 parent 3e8a744 commit c155d4e

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

pod-cached.iml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,13 @@
2222
</SOURCES>
2323
</library>
2424
</orderEntry>
25+
<orderEntry type="module-library">
26+
<library name="JSON::Fast:ver&lt;0.9.18+&gt;" type="perl6">
27+
<CLASSES />
28+
<SOURCES>
29+
<root url="raku://1165951813:JSON::Fast:ver&lt;0.9.18+&gt;!/" />
30+
</SOURCES>
31+
</library>
32+
</orderEntry>
2533
</component>
2634
</module>

t/040-pod-extraction.t

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,44 @@ Some text
2626
=end pod
2727
POD-CONTENT
2828

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-
3629
(DOC ~ '/a-second-pod-file.pod6').IO.spurt(q:to/POD-CONTENT/);
3730
=begin pod
3831
=TITLE More and more
3932
4033
Some extra changed text but now it is changed
4134
4235
=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';
4443

4544
$cache .=new(:path( REP ));
4645
my %h = $cache.hash-files;
4746
#--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';
4949
#--MARKER-- Test 3
5050
lives-ok { $rv = $cache.pod('a-second-pod-file') }, 'Old Pod is provided';
5151

5252
#--MARKER-- Test 4
5353
like $rv[0].contents[1].contents[0],
54-
/'Some more text but now it is changed'/,
54+
/'Some extra changed'/,
5555
'previous text in source';
5656

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+
5767
diag 'testing freeze';
5868
#--MARKER-- Test 5
5969
throws-like { $cache.freeze }, Exception,
@@ -64,6 +74,7 @@ throws-like { $cache.freeze }, Exception,
6474
ok $cache.update-cache, 'updates without problem';
6575

6676
#--MARKER-- Test 7
77+
say $cache.pod('a-second-pod-file')[0];
6778
like $cache.pod('a-second-pod-file')[0].contents[1].contents[0],
6879
/'Some more text but now it is changed'/,
6980
'new version after update';

0 commit comments

Comments
 (0)