-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test-runner): add proper support for testfiles
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- For some reason when I define the tests in the main runner the busted context cannot be found, | ||
--- so I just created another file for that. | ||
|
||
local M = {} | ||
|
||
---@package | ||
function M.__test(testfiles_dir) | ||
describe('auto test runner', function() | ||
it('returns a proper testfiles dir', function() | ||
local file = testfiles_dir .. '/auto_test_runner/test.txt' | ||
print(file) | ||
local f, msg = io.open(file) | ||
|
||
if not f then | ||
assert.message(('Kurwa nie dziala: %s'):format(msg)).falsy(true) | ||
end | ||
|
||
assert.are.equal(vim.trim(f:read('*a')), 'works') | ||
end) | ||
end) | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
works |