tact.vim icon indicating copy to clipboard operation
tact.vim copied to clipboard

Can we test the plugin in CI?

Open anton-trunov opened this issue 1 year ago • 6 comments
trafficstars

A basic test would be to install everything, including Tact and tact.vim and run some command(s) on a sample contract to make sure we have reproducible installation instructions for Linux/Windows/macOS.

And maybe some other tests for plugin functionality would be be great to have.

anton-trunov avatar Apr 04 '24 06:04 anton-trunov

Perhaps we could also test auto-completion, so that issues like #18 once resolved never appear again

anton-trunov avatar Apr 04 '24 06:04 anton-trunov

I think yes, we can even test auto-completion by envoking vim in headless mode and jumping around the file, while evaluating the "backend" of auto-completion (giant tact#Complete() function from autoload/tact.vim).

From the top of my head I see adding a let g:tact_debug flag check, then if it's set — outputting all the errors in logs and then grepping the logs for errors & such. Maybe, Vim's internal error output can be redirected too, didn't look into that yet.

Great idea, though!

novusnota avatar Apr 04 '24 11:04 novusnota

Oh, and also — please enable Actions tab in the settings of this repo, otherwise we'll only be able to test locally (which is also nice, but incomplete).

novusnota avatar Apr 04 '24 11:04 novusnota

enable Actions tab in the settings of this repo

done

anton-trunov avatar Apr 04 '24 14:04 anton-trunov

and then grepping the logs for errors & such

Does Vim have some sort of (stable) API that we can use for this task? Grepping makes it brittle

anton-trunov avatar Apr 04 '24 14:04 anton-trunov

and then grepping the logs for errors & such

Does Vim have some sort of (stable) API that we can use for this task? Grepping makes it brittle

I'll look into it more, but I just meant to make a special log file and manually log stuff there in the background upon getting any kind of try-catch-ish error (caught by me), because throughout the code nearly all places are covered in sending various error messages.

It's just that sometimes those errors don't bubble up (#15), so I though it would be nice to log them in the background into some file when a special flag is given, and later inspect

novusnota avatar Apr 04 '24 16:04 novusnota