mirror of
1
0
Fork 0
ultimate-vim/sources_non_forked/vim-elixir/spec/indent/if_spec.rb

42 lines
548 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Indenting if clauses' do
i <<~EOF
if foo do
bar
end
EOF
i <<~EOF
if foo do
bar
else
baz
end
EOF
i <<~EOF
def test do
"else"
end
EOF
i <<~EOF
if true do
else
end
EOF
i <<~EOF
def exec(command, progress_func \\ fn(_, state) -> state end, key \\ nil, output \\ nil) do
if key do
with_cache(key, output, fn -> do_exec(command, progress_func) end)
else
do_exec(command, progress_func)
end
end
EOF
end