|
From: <caw...@us...> - 2007-08-01 18:52:18
|
Revision: 2914
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2914&view=rev
Author: cawilliams
Date: 2007-08-01 11:52:17 -0700 (Wed, 01 Aug 2007)
Log Message:
-----------
try to handle more cases of indent/de-indenting code
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/ruby/TC_RubyAutoIndentStrategy.java
Modified: trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/ruby/TC_RubyAutoIndentStrategy.java
===================================================================
--- trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/ruby/TC_RubyAutoIndentStrategy.java 2007-08-01 18:52:12 UTC (rev 2913)
+++ trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/ruby/TC_RubyAutoIndentStrategy.java 2007-08-01 18:52:17 UTC (rev 2914)
@@ -67,6 +67,20 @@
"end", d.get());
}
+ public void testHandlesElsifAfterIfProperly() throws Exception {
+ DocumentCommand c = addNewline("def if_else_test\r\n" +
+" if a == true\r\n" +
+" elsif false\r\n" +
+" end\r\n" +
+"end", 49);
+ assertEquals("\r\n ", c.text);
+ assertEquals("def if_else_test\r\n" +
+ " if a == true\r\n" +
+ " elsif false\r\n" +
+ " end\r\n" +
+ "end", d.get());
+ }
+
private DocumentCommand addNewline(String source, int offset) {
RubyAutoIndentStrategy strategy = new RubyAutoIndentStrategy(null, null);
DocumentCommand c = createNewLineCommandAt(offset);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|