On Fri, Feb 13, 2015 at 10:41:08AM +0100, FRIGN wrote: > I have a mixed opinion about test-environments. In my opinion, they > become necessary when the developer can't grasp the complexity of his > program and needs to check if certain vectors passed to his program > result in the same output vector as expected in the standard. > However, this doesn't assure deviations don't happen. It's much better > to look at the code again and rewrite it in a shorter and concise way.
Yeah unit testing is useless. Testing overall program behaviour, especially when the program is large (only valid candidate in sbase is sed) is useful. Evan Gates has some sed scripts that he used to test sed, we can just use those and run them every time we make an intrusive change. I don't think there is a need to put them in a separate sbase-test repo or anything like that. The reason this is useful for sed is that it is large and complex enough by nature. Regardless of how you rewrite it, it won't be easy to have the innate confidence that it works correctly in all cases (or that it indeed conforms to POSIX). This is something that we should attempt to achieve at all times, but having some test scripts lying around won't hurt. The sed games are also very good candidates.