mcauley-penney / mmv-c

Interactively rename files with your favorite editor
MIT License
10 stars 1 forks source link

How to run tests? #21

Closed balaraz closed 4 months ago

balaraz commented 4 months ago

When I run tests using make test, I get a compilation error.

cc ./test/test_utils.c ./test/unity.c -o ./test/bin/test_utils
./test/test_utils.c:2:10: критична помилка: unity.h: Немає такого файла або каталогу
    2 | #include "unity.h"
      |          ^~~~~~~~~

And also the file unity.c does not exist.

mcauley-penney commented 4 months ago

The repository is set up to clone and use the Unity test framework when certain files are changed and committed. To test the project manually, one must clone Unity and place its source files in this projects test directory (see here for the command used to do this during the automated workflow).

As a forewarning, this project has issues and I haven't touched it in a while. It is not dead, but I just haven't had time to work on it recently.

balaraz commented 4 months ago

Thank you. If I update this project a bit, what I can, will you accept a pull-request?

mcauley-penney commented 4 months ago

I'm open to PRs, yes 👍🏻

I hope to work on this project again someday soon. In #20, I documented some major improvements that someone on Reddit showed me and I hope to work through them from scratch.

balaraz commented 4 months ago

I want to switch to CMake because it makes it easier to build the program and CTest improves testing. And CPack can build .deb packages and more at once.

It would also to add the Unity library as a git submodule. Since Unity also uses CMake, it can be easily use.

mcauley-penney commented 4 months ago

Sounds good! I think these are useful changes and I'll be learning some new things in the process. The git submodule change for Unity is definitely a better way to handle this.