Skip to content

Commit 704ac72

Browse files
committed
Clarify the intent of the test for "ruby -h" to fit in 80x25
1 parent b01fd2d commit 704ac72

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/ruby/test_rubyoptions.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ def test_source_file
4747
assert_in_out_err([], "", [], [])
4848
end
4949

50+
# This constant enforces the traditional 80x25 terminal size standard
51+
TRADITIONAL_TERM_COLS = 80 # DO NOT MODIFY!
52+
TRADITIONAL_TERM_ROWS = 25 # DO NOT MODIFY!
53+
5054
def test_usage
55+
# This test checks if the output of `ruby -h` fits in 80x25
5156
assert_in_out_err(%w(-h)) do |r, e|
52-
assert_operator(r.size, :<=, 25)
53-
longer = r[1..-1].select {|x| x.size >= 80}
57+
assert_operator(r.size, :<=, TRADITIONAL_TERM_ROWS)
58+
longer = r[1..-1].select {|x| x.size >= TRADITIONAL_TERM_COLS}
5459
assert_equal([], longer)
5560
assert_equal([], e)
5661
end

0 commit comments

Comments
 (0)