diff options
Diffstat (limited to 'test/csv/tc_table.rb')
-rw-r--r-- | test/csv/tc_table.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/csv/tc_table.rb b/test/csv/tc_table.rb index 028274d97f..1e572d979c 100644 --- a/test/csv/tc_table.rb +++ b/test/csv/tc_table.rb @@ -1,4 +1,5 @@ -#!/usr/local/bin/ruby -w +#!/usr/bin/env ruby -w +# encoding: UTF-8 # tc_table.rb # @@ -389,4 +390,17 @@ class TestCSVTable < Test::Unit::TestCase assert_equal(@rows.size, @table.size) end + + def test_inspect_shows_current_mode + str = @table.inspect + assert(str.include?("mode:#{@table.mode}"), "Mode not shown.") + + @table.by_col! + str = @table.inspect + assert(str.include?("mode:#{@table.mode}"), "Mode not shown.") + end + + def test_inspect_is_us_ascii_encoded + assert_equal("US-ASCII", @table.inspect.encoding.name) + end end |