View Source mix aoc.test (aoc v0.14.0)

Runs your test file for the Advent of Code puzzle.

Note that test files generated by the mix aoc.create command are regular ExUnit tests.

You can always run mix test or a test specified by a file and an optional line number like this:

mix test test/2023/day01_test.exs:123

In order to use this command, you should define it as a test environment command in your mix.exs file by defining a cli/0 function:

def cli do
  [
    preferred_envs: ["aoc.test": :test]
  ]
end

Usage

mix aoc.test [options]

Options

  • -y, --year <integer> - Year of the puzzle. Defaults to today's year or custom default.
  • -d, --day <integer> - Day of the puzzle. Defaults to today's day or custom default.
  • --trace - forward option to mix test.
  • --stale - forward option to mix test.
  • --failed - forward option to mix test.
  • --seed <integer> - forward option to mix test.
  • --max-failures <integer> - forward option to mix test.
  • --help - Displays this help.

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

run(argv)

Callback implementation for Mix.Task.run/1.