add a test for syntax errors in the ./debian/control file
Created attachment 17664 [details] [review] Bug 10112 - add test for ./debian/control file to test, apply patch... - run successful test $ perl ./t/00-valid-debian-control-file.t 1..1 ok 1 - parsed ./debian/control file ok - add bad string to ./debian/control file $ sed -i -e '20i -------\' ./debian/control - run failed test $ perl ./t/00-valid-debian-control-file.t 1..1 not ok 1 - parsed ./debian/control file ok
Created attachment 17751 [details] [review] Bug 10112 - add test for ./debian/control file to test, apply patch... - run successful test $ perl ./t/00-valid-debian-control-file.t 1..1 ok 1 - parsed ./debian/control file ok - add bad string to ./debian/control file $ sed -i -e '20i -------\' ./debian/control - run failed test $ perl ./t/00-valid-debian-control-file.t 1..1 not ok 1 - parsed ./debian/control file ok Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Hm test fails for me, I think Parse::DebControl might be a new dependency? Do we want to add this dependency for testing an automatically generated file?
Tomas, Does this make sense for you?
If we had such tests, they should generate the control file out of the control.in file as Robin does, and test it instead. Because we want to test the control file generation, not the validity of the current file. It could be done on a temporary directory as other tests do.
Created attachment 64313 [details] [review] Bug 10112 - add test for ./debian/control* files to test, apply patch... 1/ install libparse-debcontrol-perl package apt-get install libparse-debcontrol-perl 2/ run successful tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly ok 2 - parsed ./debian/control.in file cleanly 3/ add some bad syntax to a file $ sed -i -e '20i -------\' ./debian/control.in 4/ run failed tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly not ok 2 - parsed ./debian/control.in file cleanly
What is an appropriate statuse of this?
Created attachment 65654 [details] [review] [SIGNED OFF] Bug 10112 - add test for ./debian/control* files to test, apply patch... 1/ install libparse-debcontrol-perl package apt-get install libparse-debcontrol-perl 2/ run successful tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly ok 2 - parsed ./debian/control.in file cleanly 3/ add some bad syntax to a file $ sed -i -e '20i -------\' ./debian/control.in 4/ run failed tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly not ok 2 - parsed ./debian/control.in file cleanly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
The patch proposes a new dependency libparse-debcontrol-perl and there has been some discussion about it.
Created attachment 66704 [details] [review] Bug 10112 - add test for ./debian/control* files to test, apply patch... 1/ install libparse-debcontrol-perl package apt-get install libparse-debcontrol-perl 2/ run successful tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly ok 2 - parsed ./debian/control.in file cleanly 3/ add some bad syntax to a file $ sed -i -e '20i -------\' ./debian/control.in 4/ run failed tests $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly not ok 2 - parsed ./debian/control.in file cleanly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to Katrin Fischer from comment #9) > The patch proposes a new dependency libparse-debcontrol-perl and there has > been some discussion about it. Where/When/Why?
Honestly? I don't remember. Probably just have to check with Mirko if it's ok?
(In reply to Katrin Fischer from comment #12) > Honestly? I don't remember. Probably just have to check with Mirko if it's > ok? Yeah, we need to check with Mirko if he is ok
Is this something you still want to do, Mason, or should we close this one?
Mason, could you maybe review this one to see if it's still required?