Errors in "Using scanners with Builders" example

Andreas Gustafsson <[email protected]> Tue, 30 Jan 2024 16:58:30 +0200
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
Hi all,

I was going to file a bug report but was asked to bring the issue here
first.

If I copy and paste the example code from
https://scons.org/doc/production/HTML/scons-user/ch20s03.html
into a SConstruct and run it, I get a syntax error because
of unbalanced parentheses in

  kscan = Scanner(function=kfile_scan, skeys=['.k'], path_function=FindPathDirs('KPATH')

And after fixing that, I get a second error:

  scons: *** [file.foo] TypeError : kfile_scan() missing 1 required positional argument: 'arg'

As a meta-issue, given the emphasis the SCons project seems to place
on automated testing, how come these aren't caught by some automated
test?
-- 
Andreas Gustafsson, [email protected]