fix(test): update vimdocs
This commit is contained in:
parent
97873ffd37
commit
a8f16fb4f9
8 changed files with 126 additions and 79 deletions
|
|
@ -1,12 +1,15 @@
|
|||
describe('cp.cache', function()
|
||||
local cache
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
cache = require('cp.cache')
|
||||
cache.load()
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
cache.clear_contest_data('atcoder', 'test_contest')
|
||||
cache.clear_contest_data('codeforces', 'test_contest')
|
||||
cache.clear_contest_data('cses', 'test_contest')
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
describe('cp.config', function()
|
||||
local config
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
config = require('cp.config')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
end)
|
||||
|
||||
describe('setup', function()
|
||||
it('returns defaults with nil input', function()
|
||||
local result = config.setup()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
describe('cp.diff', function()
|
||||
local diff = require('cp.diff')
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
local diff
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
diff = require('cp.diff')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
end)
|
||||
|
||||
describe('get_available_backends', function()
|
||||
it('returns vim and git backends', function()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
describe('cp.highlight', function()
|
||||
local highlight = require('cp.highlight')
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
local highlight
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
highlight = require('cp.highlight')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
end)
|
||||
|
||||
describe('parse_git_diff', function()
|
||||
it('skips git diff headers', function()
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
describe('cp.problem', function()
|
||||
local problem
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
problem = require('cp.problem')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
end)
|
||||
|
||||
describe('create_context', function()
|
||||
local base_config = {
|
||||
contests = {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ describe('cp.snippets', function()
|
|||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
package.loaded['luasnip'] = nil
|
||||
package.loaded['luasnip.extras.fmt'] = nil
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
describe('cp.test_render', function()
|
||||
local test_render = require('cp.test_render')
|
||||
local spec_helper = require('spec.spec_helper')
|
||||
local test_render
|
||||
|
||||
before_each(function()
|
||||
spec_helper.setup()
|
||||
test_render = require('cp.test_render')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
spec_helper.teardown()
|
||||
end)
|
||||
|
||||
describe('get_status_info', function()
|
||||
it('returns AC for pass status', function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue