-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add powershell script equivalents of test scripts and add windows to the test matrix for the test pipeline #42
base: main
Are you sure you want to change the base?
Changes from all commits
1d1a7fc
888237f
52de01c
df8678c
7a6c73f
b63b4ab
a2d37c7
d3a247f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/.clj-kondo/ | ||
/.test-config/ | ||
/.test-state/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -408,6 +408,12 @@ | |
(tset t k nil))) | ||
nil) | ||
|
||
(fn dbg [x] | ||
"Prints each of the arguments using vim.inspect and returns them. | ||
Great for debugging some confusing code without changing the behavior" | ||
(print (vim.inspect x)) | ||
x) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea, quite a common function to write repeatedly. |
||
|
||
{: rand | ||
: nil? | ||
: number? | ||
|
@@ -458,4 +464,5 @@ | |
: constantly | ||
: distinct | ||
: sort | ||
: clear-table!} | ||
: clear-table! | ||
: dbg} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,15 @@ | |
(replace-extension "lua") | ||
(replace-dirs "fnl" "lua"))) | ||
|
||
(fn standardize-path [path] | ||
"Replaces all non standard path separators with the standard forward slash" | ||
(str.replace path "\\" "/")) | ||
|
||
(fn correct-separators [path] | ||
"Replaces all path separators with the ones appropriate for this system" | ||
(str.replace path "\\" (path-sep)) | ||
(str.replace path "/" (path-sep))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure of the right answer yet, but something about how these two functions work makes me think there will be issues 🤔 also I didn't think string.gsub mutated the original string? So only the second My thinking is along the lines of "you can have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh. This is just my not being so familiar with fennel. Sounds like its better to use vim.fs.normalize than my changes |
||
|
||
{: basename | ||
: filename | ||
: file-name-root | ||
|
@@ -108,4 +117,6 @@ | |
: join-path | ||
: read-first-line | ||
: replace-dirs | ||
: fnl-path->lua-path} | ||
: fnl-path->lua-path | ||
: standardize-path | ||
: correct-separators} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,10 +66,15 @@ | |
(= suffix (string.sub s (- s-len suffix-len -1))) | ||
false))) | ||
|
||
(fn replace [s from to] | ||
"Replace all occurrences of from with to in the string." | ||
(string.gsub s from to)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So gsub is actually doing pattern based replacement, not whole string replacement. This will cause issues if someone uses Lua pattern syntax without realising. I don't think this needs to be wrapped in a function here and I'm totally happy for the rest of the code to call into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah duh. My bad |
||
|
||
{: join | ||
: split | ||
: blank? | ||
: triml | ||
: trimr | ||
: trim | ||
: ends-with?} | ||
: ends-with? | ||
: replace} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this one support Windows when the other didn't or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This supports windows when the previous one does not