Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#165] [#192] Add tests for specific cases of local references #194

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

Sorokin-Anton
Copy link
Contributor

@Sorokin-Anton Sorokin-Anton commented Oct 13, 2022

Description

Problem: there is no tests for links to directories and non-markdown files. Also we aren't testing that links are case sensetive

Solution: add such tests to check-local-refs, also check that only links to directory are allowed to have trailing slash,
e.g. a.md/ is bad and dir1/ is ok

Related issue(s)

Fixes #165
Fixes #192

✅ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).

Related changes (conditional)

  • Tests

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
  • Public contracts

    • Any modifications of public contracts comply with the Evolution
      of Public Contracts
      policy.
    • I added an entry to the changelog if my changes are visible to the users
      and
    • provided a migration guide for breaking changes if possible

Stylistic guide (mandatory)

@Sorokin-Anton Sorokin-Anton force-pushed the Sorokin-Anton/#165-test-different-local-refs branch from 3e6908d to f90b915 Compare October 13, 2022 15:12
Problem: there is no tests for links to directories and non-markdown files.
Also we aren't testing that links are case sensetive

Solution: add such tests to `check-local-refs`, also check that only links
to directory are allowed to have trailing slash,
e.g. `a.md/` is bad and `dir1/` is ok
@Sorokin-Anton Sorokin-Anton force-pushed the Sorokin-Anton/#165-test-different-local-refs branch from f90b915 to 22b3ce1 Compare October 13, 2022 15:18
@Sorokin-Anton Sorokin-Anton requested a review from dcastro October 13, 2022 15:19

[existing-anchor-rel-1](d2f2.md#existing-anchor-d2f2)
[existing-anchor-rel-2](./d2f2.md#existing-anchor-d2f2)
[existing-anchor-rel-3](../dir2/../d1f1.md#existing-anchor-d1f1)

[bad-file-rel](../a/b/c/unexisting-file.md)
[bad-slash-file-rel](d2f2.md/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link should be valid, both github and gitlab correctly link to [a](./README.md/). I'll create an issue for this.

Copy link
Contributor Author

@Sorokin-Anton Sorokin-Anton Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I left this untouched (with a comment referencing issue)

@Sorokin-Anton Sorokin-Anton changed the title [#165] [#192] Add tests for specific cases [#165] [#192] Add tests for specific cases of local references Oct 18, 2022
@Sorokin-Anton Sorokin-Anton merged commit c2aad89 into master Oct 18, 2022
@Sorokin-Anton Sorokin-Anton deleted the Sorokin-Anton/#165-test-different-local-refs branch October 18, 2022 19:21
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.

Test case-sensitivity Test all variants of local references
2 participants