-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Unit test fixes and run them as a GH action #330
Conversation
also annotate a bug with Lib.current_session_name
…g an error The basic bug was introduced in rmagatti#322 becase `table.concat` returns a string so `content[1]` doesn't make sense. The bug that rmagatti#322 was fixing was repeated in `session-lens/actions.lua` so it made sense to clean it all up.
It was failing due to inconsistent path separator usage. I found out that vim.fn.expand (Lib.expand) canonicalizes the path separator which could be useful for standardizing paths / preventing edge cases. Whether it picks \ or / depends on the shellslash setting.
The double path separators can cause problems with equality tests when comparing sessions and that's a problem for the alternate session feature.
This ended up being a bit more involved than I thought it would. Fixing the referenced bugs was easy but I noticed places where the path separators were being inconsistently added which made it hard to follow why things were happening and would cause the alternate session to be effectively the same as the current one. |
I'm working on the GH action to automatically run the unit tests. I'll add that once I have it working |
Yeah a GH action to run the tests on push to PRs would be ideal 👍 great work @cameronr 💪 |
Looks like the --embed was causing issues. Not sure why I had it in the first place.
I think this group of changes is all set. It'll run the tests on push and on PRs and test against 0.7.2, 0.8.3, 0.9.5, 0.10.0, and nightly. |
I somehow accidentally removed the whitespace for the Makefile step that installs plenary. It should auto install now. Let me know if it doesn't work for you!
Also, what do you think about running the tests on commit? I'm not sure how GH does it but I assume something like that would be possible?