Created
August 26, 2023 11:41
-
-
Save ab5tract/c68a615da817efc855cc4fe6ce9e41c5 to your computer and use it in GitHub Desktop.
Quick script to compare which tests are passing/failing between base and changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env raku | |
sub MAIN($file-a, $file-b) { | |
my $set-a = $file-a.IO.lines; | |
say "{$set-a.elems} passing tests in $file-a"; | |
my $set-b = $file-b.IO.lines; | |
say "{$set-b.elems} passing tests in $file-b"; | |
# Symmetric difference doesn't account for what is missing from where.. | |
# we may pass tests in A that fail in B, but also tests in B that pass in B but fail in A | |
#my $diff = $set-a (^) $set-b; | |
#say "{$diff.elems} difference in passing tests"; | |
#$diff.keys.join("\n").say; | |
my $diff-left = $set-a (-) $set-b; | |
say "{$diff-left.elems} tests passed in '$file-a' but failed in '$file-b'"; | |
$diff-left.keys.join("\n\t").say; | |
my $diff-right = $set-b (-) $set-a; | |
say "{$diff-right.elems} tests passed in '$file-b' but failed in '$file-a'"; | |
$diff-right.keys.join("\n\t").say; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment