Skip to content

Commit

Permalink
✅ Add buffer appending unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
S0AndS0 committed Oct 7, 2024
1 parent c51d5f6 commit 6a836b2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/units/autoload_proompter_lib.vader
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

""
" proompter#lib#ConcatenateWithLastLineOfBuffer {{{
Given(One line already present):
Vim is
Execute(proompter#lib#ConcatenateWithLastLineOfBuffer -- Complete the sentence):
call proompter#lib#ConcatenateWithLastLineOfBuffer(bufnr('[Vader-workbench]'), ' the best!')
Expect(One line to be finished):
Vim is the best!

Given(Two lines already present):
Vim is the best!
And
Execute(proompter#lib#ConcatenateWithLastLineOfBuffer -- Inserts a new line after appending to existing content):
call proompter#lib#ConcatenateWithLastLineOfBuffer(bufnr('[Vader-workbench]'), " there is no\ndoubt about it")
Expect(One line to be finished):
Vim is the best!
And there is no
doubt about it
" }}}
""

0 comments on commit 6a836b2

Please sign in to comment.