-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor argument order checking (#499)
* Refactor argument order checking
- Loading branch information
1 parent
af70d96
commit 93236ce
Showing
2 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -490,6 +490,16 @@ end | |
end | ||
end | ||
|
||
@testset "Argument order" begin | ||
with_temp_env() do | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("add FooBar Example#foobar#foobar") | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("up Example#[email protected]") | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("pin [email protected]@0.0.1") | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("up #foobar") | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("add @0.0.1") | ||
end | ||
end | ||
|
||
@testset "`do_generate!` error paths" begin | ||
with_temp_env() do | ||
@test_throws CommandError Pkg.REPLMode.pkgstr("generate @0.0.0") | ||
|