-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a directory of test cases #7
Comments
Good idea; this would help ensure compatibility with the CLI. I think those |
@inkarkat is this something you could take on as a task? |
Yes, I could do this. Let's first wait for more feedback, though. Do other implementations actually strictly adhere to the same output format / default highlighting / user messages? Do they support the same command-line switches (such as |
I think we also need to store the original contents of |
I see limited use for my tool - topydo. My tool was only inspired by the todo.txt CLI, and I borrowed quite some subcommands, but never intended to mimic the exact behavior. There is highlighting involved, different sorting orders, filters (e.g. items with a threshold). In short, a tool can do anything with the output. Moreover, topydo also does some tricks with the inputs, i.e. converting relative dates to absolute ones. Of course I could make a fixture with a configuration that approaches the original CLI as close as possible. But I doubt it will always print the desired output (so NOK every time), and the test coverage would be quite low because topydo adds so much on top of input / output processing. |
@bram85 This brings up a good case. What could we provide in the spec that would help tool developers cover the base cases? Such as if the "add" command is called with |
What makes the
todo.txt
format amazing is the open-source and open-standard of it. There are so many tools written around the format ranging from shell to python to node and everything in between.The todotxt-cli has a directory of tests that it runs to make sure all cases work. I propose that we create a directory of tests with
*.in
and*.out
files. This allows tool developers to use whatever test framework they want as long as when a*.in
file runs through their tool, the*.out
matches their output.Example
0000-add.in
0000-add.out
Thoughts and comments welcome.
The text was updated successfully, but these errors were encountered: