summaryrefslogtreecommitdiff
path: root/test/test-main.rb
diff options
context:
space:
mode:
authormakoto kuwata <kwa@kuwata-lab.com>2007-05-22 21:41:27 +0000
committermakoto kuwata <kwa@kuwata-lab.com>2007-05-22 21:41:27 +0000
commit3d5da3f51b0563d32ab2d37eb595c04900089b73 (patch)
treefffe5db374870100e479856be9e9db070eee3db5 /test/test-main.rb
parent0d3fde5fc7e030dcd9b93c7fb8246e2f29d733ee (diff)
downloaderubis-3d5da3f51b0563d32ab2d37eb595c04900089b73.tar.gz
- [enhance] add '-T' (don't expand tab characters)
- [enhance] add 'contrib/erubis-run.rb' (thanks to Andrew R Jackson) - [update] add description about erubis-run.rb and DeleteIndentEnhancer
Diffstat (limited to 'test/test-main.rb')
-rw-r--r--test/test-main.rb26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/test-main.rb b/test/test-main.rb
index c1a63d9..86e1f5b 100644
--- a/test/test-main.rb
+++ b/test/test-main.rb
@@ -364,7 +364,7 @@ END
end
- def test_untabify1 # -t
+ def test_untabify1 # -t (obsolete)
yamlfile = "test.context2.yaml"
@input = INPUT2
@expected = OUTPUT.gsub(/\(none\)/, 'Hello')
@@ -383,6 +383,30 @@ END
end
+ def test_untabify2 # -T
+ yamlfile = "test.context2.yaml"
+ @input = INPUT2
+ @expected = OUTPUT.gsub(/\(none\)/, 'Hello')
+ @options = "-Tf #{yamlfile}"
+ #
+ yaml = <<-END
+ user: Hello
+ items:
+ - aaa
+ - bbb
+ - ccc
+ END
+ File.open(yamlfile, 'w') { |f| f.write(yaml) }
+ assert_raise(ArgumentError) do
+ _test()
+ end
+ File.open(yamlfile, 'w') { |f| f.write(yaml.gsub(/\t/, ' '*8)) }
+ _test()
+ ensure
+ File.unlink(yamlfile) if test(?f, yamlfile)
+ end
+
+
def test_symbolify1 # -S
yamlfile = "test.context3.yaml"
@input = <<END