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

[WIP] port tests to run completely in vim #582

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

jbodah
Copy link
Collaborator

@jbodah jbodah commented Sep 18, 2024

This PR is working towards porting all of the tests to run directly in vim (I have only tested with nvim). It may be difficult to get some of the typing tests implemented, however paste-then-indent tests work well (and are much faster)

$ ./run_vimtest

Failures open up a buffer with something like:

image

Making the indent tests directory based means we can simply import Elixir code and get free testing.

@jbodah jbodah marked this pull request as draft September 18, 2024 03:14
@@ -0,0 +1,3 @@
#! /usr/bin/env sh
set +xe
vim -c ":so test.vim"
Copy link
Collaborator Author

@jbodah jbodah Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to initialize with clean vimrc

@@ -0,0 +1,3 @@
# empty
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First line = search term; second line = syngroup; rest = body tested on

@sodapopcan
Copy link
Collaborator

sodapopcan commented Sep 18, 2024

This is amazing! I can take a look on the weekend. I still use regular Vim so I can test there and help with conversions.

One thing after a quick read, other test frameworks often :new for each test, setlocal for options, the :close. This may be a simpler way to handle clean up.

@jbodah
Copy link
Collaborator Author

jbodah commented Sep 19, 2024

Have you come across any other test suites? I’d be curious to see examples of what other projects have done. I agree creating new buffers would be simpler. I’d also be interested in getting a more formal test runner (specifically something with exit codes that would could get running in CI). I tried themis a bit but struggled getting anything meaningful tested and couldn’t figure out how to log to stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants