#rocket
8 posts · Last used 22d
Project #RocketLang update:
While working towards my current goal of having a unit-testing library in #Rocket, I came across a few bugs:
string_1 + string_2actually didn't work when one or both of the strings where empty. Fixed and added test cases.os.scandir(path)actually wasn't working properly. Most of my test cases used mocking, but the function errored out when run without mocks. The test cases without mocking didn't properly check the results. Now I implemented a proper testcase that creates a temporary directory, puts some files there and checks for those.
The os.scandir() test case above actually turned out to be a bit flaky: It worked locally, but failed in my CI/CD pipeline. The reason was that os.scandir() returned the files in a different order on the CI/CD server. So I tried sorting them by name which ... requires supporting <, <=, >, and >= for strings. So I implemented that, too (lexicographic sorting).
And ByteString got a new method: ends_with.
Another update on #RocketLang (my pet #programming language):
I just implemented the dir() function for modules, so that you can discover what's declared in a module. (Really, I had most of it stashed already.)
Another step towards implementing a unit-testing library for #Rocket, more specifically: auto-discovery of test cases.
