use v6;

# Usage: perl6 add-test-stubs <file.t> ...

use Test::Ix;

for @*ARGS -> $file {
    if ! $file ~~ :f {
        warn "Could not find $file -- skipping";
        next;
    }
    my $new-contents = inject-subs-in-file($file);
    my $fh = open($file, :w);
    $fh.print($new-contents);
}
