-
Notifications
You must be signed in to change notification settings - Fork 237
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
Cram tests #34
base: master
Are you sure you want to change the base?
Cram tests #34
Conversation
👍 This looks pretty cool, I haven't seen cram before. It would probably help to add a simple make task that runs the cram tests though. Also, we could probably clean up the syntax a little by using something like here strings and by somehow either adding streem to the user's path or some cram-specific path before the tests are run (or you can just alias streem). I'm not sure that would be possible though, since I haven't used cram myself. Example
|
I don't like adding dependency in this phase. And I guess that cram doesn't seems to work on windows. |
I think cram could be useful, especially if our tests get a little more complicated. Also, we'll probably want to move to a fancier testing tool eventually. However, we could write our own simple test tool. For example, we could have a script that opens a file with a snippet on each line, inputs each line into |
Yes, I prefer to make owr test tool.
|
I just made a very simple test script using @ChristopherDumas's snippets: https://github.com/nicolasmccurdy/streem/blob/test-snippets/test/test_snippets.sh However, it's a work in progress, and I should probably hide successes and add some sort of useful status for make and other testing/CI tools. |
Cram should work on windows, as long as you have python and pip installed. |
I will work on making the tests cleaner like you suggested, @nicolasmccurdy. I will also add tests. If possible, can someone list the features of stream so far so that I can make tests for them? |
Windows doesn't support |
I didn't notice that, thanks. |
So are we going to merge this into the main streem, or should I close this?? |
Not hurry. We know you want to contribute. But this should do carefully considered, I think. |
I'll write more tests in the meantime. |
Now using spaces consistently instead of the previous mix of spaces and a handful of tabs :-)
…trm; matz#30 we should update tests more decriptive in the future.
Github's Linguist thinks the test files are Perl files, because the extension is |
Ok, changeing..... |
Any reason not to write the tests in C until they can be self-hosted? |
Becouse that would be sort of hard and would result in scary test code that no one would want to change, so we would end up here anyway. |
Wow, these tests are long... Is that just because they're so detailed, or is there old "good" output of the parser pasted into the tests? |
What cram does is it matches the output of the command with it's expected output. That is the output of the parser when run on code. It is long, I agree. |
It seems to me that the current tests are either too low level (and too brittle), or too based on existing output of an older version of the code (which is assuming that version has 0 bugs). That being said, cram looks pretty cool, I really liked the older versions of your tests, and I'm not against tests. I'm just not sure if we want something this complicated and brittle, which is based on trusting an older version of what the code did instead of what a human thinks it should be doing directly. |
OK. I'll work on using an updated version of streem and making the tests less brittle. |
@@ -0,0 +1,4962 @@ | |||
Streem should recognise the sequence funciton: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function*
This isn't perfectly ideal, and I'm not quite done with the tests yet, but it's better than nothing!