#!/usr/bin/env raku
use v6.d;
use IUtils;
use IUtils::Comments;

#| Execute the tests in an idris project
multi MAIN(
    "test",
    Str $project-path?, #= Base directory of the project, defaults to $*CWD
) {
    # CD into the project path if needed
    chdir($project-path.IO.resolve: :completely) if $project-path;
    # Scan for our packages
    my @packages = scan-packages;
    # Collect tests
    my @tests;
    for @packages -> $package {
        # FIXME
        say 'Finding tests for ', $package.ipkg.relative;
        for $package.sources -> $source {
            say 'Scanning for tests in ', $source;
        }
    }
}