Skip to content

#1692: print the title of the unit test without its marker in incorrect-test-object-name - #1693

Open
sherenkov wants to merge 2 commits into
objectionary:masterfrom
sherenkov:bug/#1692/test-object-name-title
Open

sherenkov wants to merge 2 commits into
objectionary:masterfrom
sherenkov:bug/#1692/test-object-name-title

Conversation

@sherenkov

Copy link
Copy Markdown
Contributor

incorrect-test-object-name checked the title of a unit test, eo:test-title(@name), against its regular expression, but printed the raw @name in the defect message. So [] +> test_abc was reported as The name of the object "+test_abc" doesn't match ..., and as "p🌵test_abc" with a parser that marks tests with p🌵/n🌵.

The message now prints the title through eo:test-title, as bad-test-name, wrong-test-order and unit-test-without-phi already do, so it reads The name of the object "test_abc" doesn't match ....

New packs in packs/single/incorrect-test-object-name/ assert the text of the message, which no pack did before:

  • prints-title-of-truthy-test.yaml: [] +> test_abc in EO;
  • prints-title-of-throwing-test.yaml: [] -> throws_when_empty in EO;
  • prints-title-of-cactus-marked-test.yaml: p🌵test_abc and n🌵throws_when_empty in XMIR, since the pinned parser still emits +/-.

All three fail on master and pass with the change, and each still expects exactly one warning per misnamed test on its line. The other packs of the lint, catches-* and allows-*, pass unchanged.

Closes #1692.

@sherenkov

Copy link
Copy Markdown
Contributor Author

@yegor256 CI is green and the branch is up to date with master, could you take a look when you have a moment? It makes incorrect-test-object-name print the name of the unit test without the parser's marker, so [] +> test_abc is reported as "test_abc" instead of "+test_abc" or "p🌵test_abc".

@sherenkov
sherenkov force-pushed the bug/#1692/test-object-name-title branch from 3ec1793 to 3ae274a Compare November 12, 2026 00:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect-test-object-name prints the internal test marker in the name of the unit test it reports

1 participant