You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
329 B
15 lines
329 B
require_relative "test_helper"
|
|
|
|
require "lox"
|
|
|
|
require "open3"
|
|
|
|
class TestLox < Lox::Test
|
|
def test_error_on_more_than_one_arg
|
|
lox_path = File.expand_path("../bin/lox", __dir__)
|
|
o, s = Open3.capture2(lox_path, "foo", "bar")
|
|
assert_equal 64, s.exitstatus
|
|
assert_equal "Usage: #{lox_path} [script]\n", o
|
|
end
|
|
end
|