Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Created August 26, 2023 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ab5tract/c68a615da817efc855cc4fe6ce9e41c5 to your computer and use it in GitHub Desktop.
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
#!/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