-
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.
This PR: - fixes the testfiles (previously it tried to find the root of the project by `.git`, which isn't available under nix - simplifies the implementation a bit (before we mapped each path to a requirable and requried them, now we just `dofile`) - adds auto test runner tests as well
- Loading branch information
Showing
4 changed files
with
29 additions
and
11 deletions.
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 |