X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/a8037bb8cc8b46d506e43005acebb1e96e090ae5..dc759ab32b05afeba5c103e2756ec4a2509fdaf6:/t/settings.vader?ds=sidebyside diff --git a/t/settings.vader b/t/settings.vader index 90a1a6a..aab7688 100644 --- a/t/settings.vader +++ b/t/settings.vader @@ -18,4 +18,25 @@ Before (disable syntax): let g:password_store_settings.enable_syntax = 'false' Execute (test disable syntax ): - AssertEqual SyntaxAt(2), '' + AssertEqual &filetype, 'pass' + +Execute (test increment password length): + AssertEqual len( password_store#generate()), 12 + +Execute (test new generates do not match): + AssertNotEqual password_store#generate(), password_store#generate() + +Given text (test ftdetect): + passwordtesting + +Before (mimic settings): + let g:password_store_settings = {} + let g:password_store_settings.enable_syntax = 'false' + let g:password_store_settings.pw_length = '16' + +Execute (test ftdetect trigger): + set filetype=pass + AssertEqual password_store#setting('enable_syntax'), 'false' + AssertEqual len( password_store#generate() ), 16 + +