I'll fix the tests tomorrow morning, gotta run for now.
I created an example in #115 which would solve this. It's really just a very small change in the TextFSM template. Also in general for these kind of changes I think it would generally be safer to keep the old test and reference data as is and just create a new test so it's easy to see that nothing old breaks.
Yes, I agree with @ogenstad - and I find I do prefer his proposal instead.
I will listen also what @dbarrosop thinks about that before taking any action.
> Also in general for these kind of changes I think it would generally be safer to keep the old test
It depends. There are a few cases to consider:
1. Internal commands/behavior changes. As the commands changes the test fail if the mocked data is not updated accordingly. So we have two cases:
1.a. Default test case, if it's too complex and it's not testing any particular scenario, it's fine to completely rewrite the normal case.
1.b. Extra cases for weird scenarios. These have to be addressed properly updating the mocked data to avoid reintroducing old bugs.
2. Internal commands/behavior doesn't change. Unless a problem is detected on the data, it is forbidden to touch those. A new one can be added and I really encourage people to add test cases triggering the bug they are fixing but old tests shouldn't be modified.
@dbarrosop, it always depends. :)