Skip to content

Commit 2e92a06

Browse files
committed
add tester
1 parent 44bf1ae commit 2e92a06

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: t.rb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test.rb

Diff for: test.rb

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require_relative '../adventofcode-common/test'
2+
3+
test_and_exit { |daypad|
4+
scripts = Dir.glob("#{__dir__}/#{daypad}_*.rb")
5+
next if scripts.empty?
6+
raise "Need exactly one script not #{scripts}" if scripts.size != 1
7+
"ruby #{scripts[0]}"
8+
}

0 commit comments

Comments
 (0)