Skip to content

Commit 26e3f84

Browse files
committed
Add basic hare spec
1 parent def9155 commit 26e3f84

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/plugin/hare_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require 'spec_helper'
2+
3+
describe "hare" do
4+
let(:filename) { 'test.ha' }
5+
6+
specify "question mark operator" do
7+
set_file_contents <<~EOF
8+
const num = getnumber()?;
9+
EOF
10+
11+
vim.search('getnumber')
12+
split
13+
14+
assert_file_contents <<~EOF
15+
const num = match (getnumber()) {
16+
case error => abort();
17+
case let t: type =>
18+
yield t;
19+
};
20+
EOF
21+
end
22+
end

0 commit comments

Comments
 (0)