Skip to content

#1697: skip unit tests written as applications in compound-name - #1698

Open
sherenkov wants to merge 1 commit into
objectionary:masterfrom
sherenkov:bug/#1697/compound-application-tests
Open

sherenkov wants to merge 1 commit into
objectionary:masterfrom
sherenkov:bug/#1697/compound-application-tests

Conversation

@sherenkov

Copy link
Copy Markdown
Contributor

compound-name checked the name of every object with a @base. A unit test written as an application, such as pos.eq 6 +> can-find-space, carries one, so it was reported as Object name "+can-find-space" should not be compound unless it's formation, while bad-test-name requires every test name to start with can-, accepts-, cannot-, rejects- or stops-on-. No name of such a test could pass both lints. A [] +> can-find-space formation escaped only because it has no @base.

The selector in names/compound-name.xsl now skips unit tests through eo:test-name from funcs/test-name.xsl, the way not-empty-atom does since #1681.

Two new packs:

  • allows-unit-tests-written-as-applications.yaml: positive and negative tests written as applications, horizontal and vertical, next to a formation test, give no defect. Without the fix it gets three.
  • catches-compound-attribute-next-to-application-test.yaml: a compound attribute space-pos next to such a test is still reported, and only it. Without the fix the test is reported too.

mvn clean test -Dtest='LtByXslTest#checksAllLints' passes locally, and both packs fail without the change.

Closes #1697.

@sherenkov
sherenkov force-pushed the bug/#1697/compound-application-tests branch from bff0d86 to b3164d6 Compare November 12, 2026 00:35

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.

compound-name falsely flags every unit test written as an application as a compound name

1 participant