junegunn / vader.vim

A simple Vimscript test framework
589 stars 40 forks source link

Having empty lines in `Expect` clauses #83

Open hgiesel opened 8 years ago

hgiesel commented 8 years ago

I have an output like this:

(2/2) [     DO] daz
(2/2) [ EXPECT] (X)
      - Expected:
          arg
      - Got:
          arg

  Success/Total: 1/2

Which is caused by a test clause like this (trailing empty whitespace signaled by dashes)

Given (foo\nbar\nbaz):                                                                
  arg                                                                                 

  foo                                                                                 
    bar                                                                               
    baz  
Do (daz):                                                                             
  /baz^Mdaz                                                                           
 Expect:                                                                               
  arg                                                                                 
--

It does what it intends too, However I try to say "I expect it saying arg with an empty line after it". Is there some way of doing so?

junegunn commented 8 years ago

Expect block will include lines with two-space indentation at the end of the block like so:

Expect:
  arg
~~

(~~ two spaces)