Bug in CMake tutorial


The example tests in Step3 of the CMake tutorial suggest to use the following regexp to verify the output of an executable call.

do_test(Tutorial -25 “-25 is [-nan|nan|0]”)

I think this does not what was intended. That matches a single character which is anything until n, or a, or n, etc.

I guess what the documentation writer intended was to write:

do_test(Tutorial -25 “-25 is (-nan|nan|0)”)

with parentheses. This matches -nan, nan or 0.

1 Like

Thanks! Would you be willing to submit an MR (instructions) for this?

Cc: @betsy.mcphail


The merge request has been submitted. Number 6572.

1 Like