1
0
Fork 0
mirror of synced 2024-12-26 08:43:19 -05:00
ultimate-vim/sources_non_forked/vim-elixir/spec/indent/if_spec.rb

42 lines
548 B
Ruby
Raw Normal View History

2022-05-18 13:31:41 -04:00
# 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