Skip to content

Commit

Permalink
reftest: add more test cases for W59
Browse files Browse the repository at this point in the history
* Shows the difference of behaviour between 'opam lint' and 'opam lint --check-upstream'
* Add test cases for special cases: conf flag, url containing git url
  • Loading branch information
rjbou committed Aug 26, 2024
1 parent 6d3992a commit 5a92d4e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ users)
* lint: add E71 test [#5561 @rjbou]
* lint: add E72 test [#5561 @rjbou]
* lint: add E73 test [#5561 @rjbou]
* lint: add more test cases for E59: special cases (conf, git url), with and without option `--with-check-upstream` [#5561 @rjbou]

### Engine
* Add a test filtering mechanism [#6105 @Keryan-dev]
Expand Down
39 changes: 39 additions & 0 deletions tests/reftests/lint.test
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,48 @@ license: "ISC"
dev-repo: "hg+https://[email protected]"
bug-reports: "https://nobug"
url { src:"an-archive.tgz" }
### opam lint ./lint.opam
${BASEDIR}/lint.opam: Passed.
### opam lint ./lint.opam --check-upstream
${BASEDIR}/lint.opam: Warnings.
warning 59: url doesn't contain a checksum
### <lint.opam>
opam-version: "2.0"
synopsis: "A word"
description: "Two words."
authors: "the testing team"
homepage: "egapemoh"
maintainer: "[email protected]"
license: "ISC"
dev-repo: "hg+https://[email protected]"
bug-reports: "https://nobug"
url { src:"an-archive.tgz" }
flags: conf
### # package with conf flag
### opam lint ./lint.opam
${BASEDIR}/lint.opam: Errors.
error 46: Package is flagged "conf" but has source, install or remove instructions
# Return code 1 #
### opam lint ./lint.opam --check-upstream
${BASEDIR}/lint.opam: Errors.
error 46: Package is flagged "conf" but has source, install or remove instructions
# Return code 1 #
### <lint.opam>
opam-version: "2.0"
synopsis: "A word"
description: "Two words."
authors: "the testing team"
homepage: "egapemoh"
maintainer: "[email protected]"
license: "ISC"
dev-repo: "hg+https://[email protected]"
bug-reports: "https://nobug"
url { src:"git+https://a/repo" }
### # package with git url
### opam lint ./lint.opam
${BASEDIR}/lint.opam: Passed.
### opam lint ./lint.opam --check-upstream
${BASEDIR}/lint.opam: Passed.
### : E60: Upstream check failed
### <lint.opam>
opam-version: "2.0"
Expand Down

0 comments on commit 5a92d4e

Please sign in to comment.