mirror of
https://github.com/amix/vimrc
synced 2025-06-17 10:55:00 +08:00
Updated plugins
This commit is contained in:
@ -27,5 +27,20 @@ describe "Indenting" do
|
||||
foo = bar; class One; end
|
||||
end
|
||||
EOF
|
||||
|
||||
assert_correct_indenting <<~EOF
|
||||
nested do
|
||||
while true do
|
||||
def foo
|
||||
if bar
|
||||
for i in collection
|
||||
def baz
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
EOF
|
||||
end
|
||||
end
|
||||
|
@ -37,4 +37,40 @@ describe "Indenting" do
|
||||
end
|
||||
EOF
|
||||
end
|
||||
|
||||
specify "endless methods" do
|
||||
# Note: A case that doesn't work at this time:
|
||||
#
|
||||
# def foo()
|
||||
# = 42
|
||||
#
|
||||
assert_correct_indenting <<~EOF
|
||||
indented_block do
|
||||
def foo(bar) = puts(bar)
|
||||
def foo!(bar) = puts(bar)
|
||||
def foo?(bar) = puts(bar)
|
||||
|
||||
def foo(bar)=puts(bar)
|
||||
|
||||
def foo(bar) = bar + 1
|
||||
|
||||
def foo() = 1 + 1
|
||||
def foo = 1 + 1
|
||||
|
||||
private def foo(bar) = bar + 1
|
||||
|
||||
def foo(bar) =
|
||||
bar + 1
|
||||
|
||||
def foo(bar = default_function()) = puts(bar)
|
||||
|
||||
def foo(bar = default_function()) =
|
||||
puts(bar)
|
||||
|
||||
def foo(
|
||||
bar
|
||||
) = puts(bar)
|
||||
end
|
||||
EOF
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user