diff --git a/autoload/neural/pre_process/cpp.vim b/autoload/neural/pre_process/cpp.vim new file mode 100644 index 0000000..effd33e --- /dev/null +++ b/autoload/neural/pre_process/cpp.vim @@ -0,0 +1,7 @@ +" Author: w0rp +" Description: Pre-processing rules for C++ files. + +function! neural#pre_process#cpp#Process(buffer, input) abort + let a:input.prompt = 'Write C++ syntax. ' + \ . a:input.prompt +endfunction diff --git a/test/vim/pre_process/test_cpp.vader b/test/vim/pre_process/test_cpp.vader new file mode 100644 index 0000000..999b346 --- /dev/null +++ b/test/vim/pre_process/test_cpp.vader @@ -0,0 +1,12 @@ +Before: + let g:input = {'prompt': 'Do something.'} + call neural#config#Load() + +After: + unlet! g:input + +Given cpp(An empty C++ file): +Execute(Basic C++ prompt editing should be done): + call neural#PreProcess(bufnr(''), g:input) + + AssertEqual 'Write C++ syntax. Do something.', g:input.prompt