Open ChimeraCoder opened 12 years ago
But how does it work for me then? I have not tested on the very latest version of testing, but it worked earlier. Also, I did not add it to makefile because it does not run all the tests at once right now. I was thinking that once I am done writing all the test cases, I will do so.
I can't tell you, but all I know is that I'm running check.bash through GNU bash, version 4.2.24, which has sh-compatibility, and it's not working.
More importantly than that, though, it seems that we're not all on the same page about the role of tests in development. Tests are the first piece of code written, before writing any functional code. In Test-Driven Development (TDD), you write all of your tests first, and they all fail, and then you write code until they all pass. That way, you know every time you run the tests before you commit your code which tests you're fixing for the first time, as well as if you're breaking tests that used to work.
That latter part is huge. Right now, I can't run make test
each time I write a new line of code and ensure that I haven't broken anything. Breaking major things like the parser is actually not so troublesome, because you'll notice that right away. Breaking something subtle, though, may not be noticed until several commits later (even days or weeks later), and that can be terribly difficult to debug. Having unit tests that are run each time code is modified solves all of that.
Right now, we're just a few days away from the end of the project, and we still don't have a comprehensive test suite for the code that we've already written, let alone the code we want to write - that's very problematic.
try working with testfile.bash. It is working
On Sat, May 5, 2012 at 1:13 PM, Aditya Mukerjee < reply@reply.github.com
wrote:
I can't tell you, but all I know is that I'm running check.bash through GNU bash, version 4.2.24, which has sh-compatibility, and it's not working.
More importantly than that, though, it seems that we're not all on the same page about the role of tests in development. Tests are the first piece of code written, before writing any functional code. In Test-Driven Development (TDD), you write all of your tests first, and they all fail, and then you write code until they all pass. That way, you know every time you run the tests before you commit your code which tests you're fixing for the first time, as well as if you're breaking tests that used to work.
That latter part is huge. Right now, I can't run
make test
each time I write a new line of code and ensure that I haven't broken anything. Breaking major things like the parser is actually not so troublesome, because you'll notice that right away. Breaking something subtle, though, may not be noticed until several commits later (even days or weeks later), and that can be terribly difficult to debug. Having unit tests that are run each time code is modified solves all of that.Right now, we're just a few days away from the end of the project, and we still don't have a comprehensive test suite for the code that we've already written, let alone the code we want to write - that's very problematic.
Reply to this email directly or view it on GitHub: https://github.com/ChimeraCoder/MLang/issues/18#issuecomment-5528756
We dont need check.bash anymore. Will be testing with testfile.bash. I think we can close this issue
Unless I'm missing something, I don't see that in the HEAD of testing, and I don't see it incorporated into the Makefile. We can't close the issue until it's been incorporated into GNU Make.
We can delete the file. it is not needed anymore. Did you try testfile.bash?
It does not work for me too.
nikhil@ubuntu:~/courses/plt/MLang$ ./testfile.bash Begin tests expr: syntax error ./testfile.bash: line 7: .output: No such file or directory ./testfile.bash: line 7: $filename: ambiguous redirect
Plus it looks suspiciously similar to run_test.sh which is quite satisfactory for our purposes.
Did you download the files I just pushed to branch Final?
na-na, please realize that, in git, there is no such thing as checkout out files from a separate branch before using them in the current branch. While it is technically possible, this is not the way git is meant to be used. I should be able to start from a clean system and clone the repository, switch to any branch, and then run it from the HEAD of that branch. If there are files relevant to the branch testing
, they have been committed to the branch testing
.
There is no mention of it in the Makefile (nor does it seem to be referred to in any other file in the directory), and it simply complains of a syntax error before hanging.
Since there aren't any comments in the file at all, I'm not entirely sure what it does, how it's different from our other tests, or whether or not it can safely be removed.