From 6866ce1fb105c4b6bc5f74e398417dd4aa5c2cd8 Mon Sep 17 00:00:00 2001 From: Antonio Date: Fri, 11 Oct 2019 17:03:14 +0200 Subject: [PATCH] Fix path for windows --- t/060-cache-ignore.t | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/t/060-cache-ignore.t b/t/060-cache-ignore.t index b9dc50e..b763dc8 100644 --- a/t/060-cache-ignore.t +++ b/t/060-cache-ignore.t @@ -9,24 +9,31 @@ constant REP = 't/tmp/ref-ignore'; constant DOC = 't/tmp/doc-ignore'; constant IGNORE_FILE = ".cache-ignore"; -mkdir DOC; +mkdir DOC.IO; my Pod::To::Cached $cache; diag 'Test .cache-ignore file'; -create-pods("test1.pod6"); -create-pods("test2.pod6"); +DOC.IO.add('test1.pod6').spurt(q:to/CONTENT/); + =begin pod + =end pod +CONTENT + +DOC.IO.add('test2.pod6').spurt(q:to/CONTENT/); + =begin pod + =end pod +CONTENT #--MARKER-- Test 1 -$cache .= new( :source( DOC ), :path( REP ), :verbose); -is-deeply $cache.get-pods.sort, +$cache .= new( :source( DOC ), :path( REP ), :!verbose); +is-deeply $cache.get-pods.sort, ("t/tmp/doc-ignore/test1.pod6", "t/tmp/doc-ignore/test2.pod6"), IGNORE_FILE ~ " does not exist"; #--MARKER-- Test 2 IGNORE_FILE.IO.spurt(""); -$cache .= new( :source( DOC ), :path( REP ), :verbose); +$cache .= new( :source( DOC ), :path( REP ), :!verbose); is-deeply $cache.get-pods.sort, ("t/tmp/doc-ignore/test1.pod6", "t/tmp/doc-ignore/test2.pod6"), @@ -35,21 +42,11 @@ unlink IGNORE_FILE; #--MARKER-- Test 3 IGNORE_FILE.IO.spurt("test2"); -$cache .= new( :source( DOC ), :path( REP ), :verbose); -is-deeply $cache.get-pods.sort, +$cache .= new( :source( DOC ), :path( REP ), :!verbose); +is-deeply $cache.get-pods.sort, ("t/tmp/doc-ignore/test1.pod6",), IGNORE_FILE ~ " with simple regex"; unlink IGNORE_FILE; rmtree REP; -rmtree DOC; - -# helpers - -sub create-pods($filename) { -(DOC ~ "/$filename").IO.spurt(q:to/POD-CONTENT/); - =begin pod - =TITLE More and more - =end pod - POD-CONTENT -} \ No newline at end of file +rmtree DOC; \ No newline at end of file