Skip to content

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

Closed
jbodah wants to merge 2 commits intomasterfrom
vimtest-indent
Closed

[WIP] port tests to run completely in vim#582
jbodah wants to merge 2 commits intomasterfrom
vimtest-indent

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

@jbodah jbodah closed this Mar 21, 2026
@sodapopcan
Copy link
Collaborator

Oh boy, I forgot about this one! Sorry for never getting back to you.

In short, I have been using Vader.vim in other projects although I'm unsure about exit codes. I may or may not take this up myself if I feel the motivation. It's largely been very low since it seems the vast majority of the Elixir community, at the vocal Elixir community, use NeoVim without this plugin.

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