Skip to content

Commit c4f2c36

Browse files
committed
Validated examples and results of tests
1 parent c2b4107 commit c4f2c36

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

tests/FileTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ public function testICSFiles(string $contents, string $file) : void
2222

2323
foreach (\explode("\n", $generated) as $line)
2424
{
25-
$this->assertLessThan(72, \strlen($file), "Line ->{$line}<- is too long (>72 chars)");
25+
$this->assertLessThan(72, \strlen($line), "Line ->{$line}<- in file {$file} is too long (>72 chars)");
2626
}
27+
28+
$resultsFile = __DIR__ . '/results/' . \basename($file);
29+
\file_put_contents($resultsFile, $generated);
2730
}
2831

2932
/**

tests/examples/6.ics

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ BEGIN:VCALENDAR
22
VERSION:2.0
33
PRODID:-//RDU Software//NONSGML HandCal//EN
44
BEGIN:VFREEBUSY
5-
ORGANIZER:mailto:[email protected]
5+
UID:19970901T115957Z[email protected]
6+
DTSTAMP:19970901T120000Z
7+
68
DTSTART:19980313T141711Z
79
DTEND:19980410T141711Z
810
FREEBUSY:19980314T233000Z/19980315T003000Z

tests/results/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ignore everything
2+
*
3+
4+
# But not these files...
5+
!.gitignore
6+
7+
# ...even if they are in subdirectories
8+
!*/

0 commit comments

Comments
 (0)