Skip to content

Commit

Permalink
Add a 'make test' target as the default
Browse files Browse the repository at this point in the history
  • Loading branch information
mguaypaq committed Dec 2, 2022
1 parent 091412e commit c40e83b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
all:
.PHONY: all
test:
@echo \# testing day??/solve.py
flake8 day??/solve.py
for script in day??/solve.py; do python3 -m doctest "$$script"; done
.PHONY: test

day0%/input.txt day%/input.txt: session.txt
mkdir --parents $(@D)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ Assuming that either:
by `curl --cookie`, or
* the file `day01/input.txt` already contains your specific puzzle
input for day 1,

you can get the corresponding outputs by running the command:
```sh
make day01/output1.txt day01/output2.txt
```

You can also test the examples from the puzzle statement with:
```sh
python3 -m doctest day01/solve.py
make test
```

[Advent of Code 2022]: <https://adventofcode.com/2022>

0 comments on commit c40e83b

Please sign in to comment.