When I try this test case:
$sel->is_text_present_ok("foo", ("$testname: line ", __LINE__));
I want to get this in the log:
ok 1 - is_text_present, "foo", Testcase-881: line 54
But I get chided on the command line:
You named your test ’54’. You shouldn’t use numbers for your test
names. Very confusing.
I figure I should be interpolating that literal into the string somehow, but I can’t get to the bottom of it. I’ve tried all sorts of configurations with the comma and quotation marks.
Is there any way to get the result I’m looking for?
Simply use the concatenation operator
.:$sel->is_text_present_ok("foo", "$testname: line " . __LINE__);Just FYI, you can interpolate it like this:
"$testname: line ${\(__LINE__)}"