Raku / doc

🦋 Raku documentation
https://docs.raku.org/
Artistic License 2.0
291 stars 293 forks source link

Recent changes fail xt/ X<> test #4491

Closed coke closed 5 months ago

coke commented 6 months ago
✗ xt/search-categories.rakutest | grep 'not ok'
    not ok 10 - Correct dimension (2) for a search anchor 'role declaration' doc/Language/objects.rakudoc
    # Failed test 'Correct dimension (2) for a search anchor 'role declaration' doc/Language/objects.rakudoc'
    # at /Users/coke/.rakubrew/versions/moar-2024.05/install/share/perl6/core/precomp/00E4C4D30CA66099863ED991D017ADBF6F0B304B/B2/B2F7F7E46D6B516E58A9B1F15344F10C035CFCC2 line 1
    # expected: '2'
    #      got: '1'
    not ok 50 - Correct dimension (2) for a search anchor 'Property' doc/Language/objects.rakudoc
    # Failed test 'Correct dimension (2) for a search anchor 'Property' doc/Language/objects.rakudoc'
    # at /Users/coke/.rakubrew/versions/moar-2024.05/install/share/perl6/core/precomp/00E4C4D30CA66099863ED991D017ADBF6F0B304B/B2/B2F7F7E46D6B516E58A9B1F15344F10C035CFCC2 line 1
    # expected: '2'
    #      got: '1'
    # You failed 2 tests of 68
not ok 46 - doc/Language/objects.rakudoc
# Failed test 'doc/Language/objects.rakudoc'
# at xt/search-categories.rakutest line 29
# You failed 1 test of 428
coke commented 6 months ago

Apologies. That test was verifying that every link had a category, and that only the categories listed in https://github.com/Raku/doc/blob/main/writing-docs/INDEXING.md#categories are considered valid. This was part of a cleanup effort a while back to make sure we weren't accidentally adding orphaned entries, and that any new categories were being added deliberately.

So

X<property|Property>

Has no category and is failing, but

X<indirect invocant syntax|Language,indirect invocant syntax>

Is in the valid "Language" category, and is OK.

X<indirect invocant syntax|Dinosaur,indirect invocant syntax>

Has the right format, but an invalid category, so we'd fix the category or add it to the explicit list in writing-docs.

Definitely willing to hear arguments about whether or not a this is a reasonable test, but it definitely helped catch some issues/typos.

coke commented 6 months ago

Also, I can fix these particular ones! Please just keep this mind when adding new X<> in going forward!

finanalyst commented 6 months ago

@coke I'll definitely keep in mind going forward. So thanks for the heads up. As far as I'm concerned, any test that picks up errors is a good test!