Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'fix-parse-errors-in-expect'

* fix-parse-errors-in-expect:
  Fix :Expect to parse complex expressions
  Unify writing style for examples
  Fix a legacy file name
  • Loading branch information...
commit b61df6d60c7090c34f051aff5756704154190750 2 parents 63f243f + 73a402b
@kana authored
Showing with 11 additions and 1 deletion.
  1. +1 −1  autoload/vspec.vim
  2. +10 −0 t/{should.vim → expect.vim}
View
2  autoload/vspec.vim
@@ -84,7 +84,7 @@ let s:suite = {} "{{{2
" Interface "{{{1
" :Expect "{{{2
-command! -bar -complete=expression -nargs=+ Expect
+command! -complete=expression -nargs=+ Expect
\ call s:cmd_Expect(
\ s:parse_should_arguments(<q-args>, 'raw'),
\ map(s:parse_should_arguments(<q-args>, 'eval'), 'eval(v:val)')
View
10 t/should.vim → t/expect.vim
@@ -2,6 +2,7 @@ describe ':Expect'
it 'should succeed if an actual value matches to an expected value'
Expect 'have to' == 'have to'
end
+
it 'should fail if an actual value does not match to an expected value'
let is_succeeded = !0
try
@@ -12,12 +13,21 @@ describe ':Expect'
endtry
Expect is_succeeded toBeFalse
end
+
+ it 'should parse "string" without errors'
+ Expect 'foo' ==# "foo"
+ end
+
+ it 'should parse ''|'' without errors'
+ Expect '|' ==# "|"
+ end
end
describe ':ExpectNot'
it 'should succeed if an actual value does not match to an expected value'
Expect 'have to' not != 'have to'
end
+
it 'should fail if an actual value matches to an expected value'
let is_succeeded = !0
try
Please sign in to comment.
Something went wrong with that request. Please try again.