mirror of
https://github.com/robertkrimen/otto
synced 2025-09-28 18:45:22 +08:00
23 lines
417 B
Perl
Executable File
23 lines
417 B
Perl
Executable File
#!/usr/bin/env perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $passed = 0;
|
|
while (<STDIN>) {
|
|
chomp;
|
|
if (m/^=== (\S+)/) {
|
|
print "$passed passed\n---\n";
|
|
print "$_\n";
|
|
my $test = "data/test/suite/$1.js";
|
|
print "$test\n";
|
|
unlink ".fail";
|
|
symlink $test, ".fail";
|
|
exit 64;
|
|
} elsif (m/passed|as expected$/) {
|
|
$passed += 1
|
|
}
|
|
}
|
|
|
|
print "$passed passed!\n";
|