Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Windows Support #68

Merged
merged 33 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3e5bbc0
ci:Cross platform tests
tris203 Jan 2, 2024
c3cde54
ci:Cross platform tests
tris203 Jan 2, 2024
261d555
ci:Cross platform tests
tris203 Jan 2, 2024
2dc27a1
fix(ci): us os_tmpdir intead of /tmp
willothy Jan 2, 2024
815bbb4
ci: longer timeout
tris203 Jan 2, 2024
65da0f8
ci: short win path
tris203 Jan 3, 2024
7434bf8
tests: mini fork
tris203 Jan 3, 2024
c8e574b
remove mini.test
tris203 Jan 3, 2024
e882b5f
add wipeout
tris203 Jan 3, 2024
7f66ec1
Merge branch 'main' into crossplatform_tests
tris203 Jan 4, 2024
366075e
Merge branch 'main' into crossplatform_tests
tris203 Jan 6, 2024
9452728
tests: e2e tests
tris203 Jan 6, 2024
fd24f16
chore: style
tris203 Jan 6, 2024
99750ac
ci: make dir
tris203 Jan 6, 2024
990dbd5
ci: fix?
tris203 Jan 6, 2024
597f7fd
ci mkdir
tris203 Jan 6, 2024
365d15a
better?
tris203 Jan 6, 2024
0a7f8af
file check
tris203 Jan 6, 2024
aa13916
debug
tris203 Jan 6, 2024
314a613
feat(windows support): change path filtering
tris203 Jan 6, 2024
e0377f5
drop filter
tris203 Jan 6, 2024
620adbb
chore:style
tris203 Jan 6, 2024
fee19be
path fix?
tris203 Jan 6, 2024
30eaee0
debug
tris203 Jan 6, 2024
0162ac8
path sep
tris203 Jan 6, 2024
84950d5
chore: style
tris203 Jan 6, 2024
f9bf525
chore: cleanup
tris203 Jan 6, 2024
97eaeb1
cleanup
tris203 Jan 6, 2024
46dad22
code review
tris203 Jan 7, 2024
030384d
chore: style
tris203 Jan 7, 2024
4caae32
Merge branch 'main' into crossplatform_tests
tris203 Jan 12, 2024
1fe7bae
Merge branch 'main' into crossplatform_tests
tris203 Jan 15, 2024
d67b3bd
Merge branch 'main' into crossplatform_tests
tris203 Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: fix?
  • Loading branch information
tris203 committed Jan 6, 2024
commit 990dbd57af7b7eab4aad261aeecfc2acad2e4752
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
nvim-versions: ['stable', 'nightly']
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
name: Plenary Tests
steps:
- name: checkout
Expand Down
23 changes: 15 additions & 8 deletions tests/hawtkeys/e2e_spec.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---@diagnostic disable-next-line: undefined-field
local eq = assert.are.same
---@diagnostic disable-next-line: undefined-field
local truthy = assert.is_true
local ts = require("hawtkeys.ts")

local function copy_configs_to_stdpath_config()
local config_dir = vim.fn.stdpath("config")
vim.fn.mkdir(config_dir, "p")
vim.fn.writefile(
vim.fn.readfile("tests/hawtkeys/example_configs/e2e_config.lua"),
config_dir .. "/e2e_config.lua"
Expand All @@ -21,23 +19,32 @@ describe("file searching", function()

it("can detect a Vim Default Keymap", function()
local keymaps = ts.get_all_keymaps()
print(vim.inspect(keymaps))
truthy(vim.tbl_contains(keymaps, function(v)
return v.from_file == "Vim Defaults"
return vim.deep_equal(v, {
from_file = "Vim Defaults",
lhs = "Y",
mode = "n",
rhs = "y$",
})
end, { predicate = true }))
end)

it("can detect a keymap from a file", function()
local keymaps = ts.get_all_keymaps()
print(vim.fn.stdpath("config"))
print(vim.inspect(keymaps))
truthy(vim.tbl_contains(keymaps, function(v)
return v.from_file == vim.fn.stdpath("config") .. "/e2e_config.lua"
return vim.deep_equal(v, {
from_file = vim.fn.stdpath("config") .. "/e2e_config.lua",
lhs = "<leader>example",
mode = "n",
rhs = "<cmd>echo 'Example'<cr>",
})
end, { predicate = true }))
end)

it("should find a file in stdpath('config')", function()
eq(true, true)
end)

after_each(function()
vim.cmd("silent! !rm " .. vim.fn.stdpath("config") .. "/e2e_config.lua")
end)
end)
2 changes: 1 addition & 1 deletion tests/hawtkeys/example_configs/e2e_config.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vim.api.nvim_set_keymap("n", "<leader>example", "echo 'Example'", {})
vim.api.nvim_set_keymap("n", "<leader>example", "<cmd>echo 'Example'<cr>", {})
Loading