charlesdaniels / bitshuffle

BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Add editor unit test using `expect` #20

Open jyn514 opened 6 years ago

jyn514 commented 6 years ago

The editor function is currently untested for most scenarios outside of a linux machine. The command expect can access the X-server API to ensure the correct response is given to a command.

charlesdaniels commented 6 years ago

The editor function is currently untested for most scenarios outside of a linux machine. The command expect can access the X-server API to ensure the correct response is given to a command.

expect actually just works with stdin/stdout/stderr, no need to spin up an X-Server (which would make our tests take forever). I don’t think it’s necessary to test the editor read function with every possible editor the user might want to use, I think just testing one CLI editor should be adequate to ensure the functionality is working. Maybe two if we’re feeling ambitious.

In theory, it would be a good idea to test using this feature with GUI editors on Windows, but I don’t feel like figuring AppVeyor out just for that. If we ever did want to do actual GUI testing (weather with X11, Wayland, or Windows), the tool to use would be Sikuli X, but I really think that would be totally overkill for a project this small.