mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Merge 10a6dff3b8
into 918ac6b2fc
This commit is contained in:
commit
cf1517b7fe
3 changed files with 72 additions and 1 deletions
|
@ -110,9 +110,28 @@ warning: No packages to upgrade. Use 'nix profile list' to see the current profi
|
|||
EOF
|
||||
|
||||
# Test removing all packages using regular expression.
|
||||
nix profile remove --regex '.*' 2>&1 | grep "removed 2 packages, kept 0 packages"
|
||||
assertStderr nix --offline profile remove --regex '.*' << EOF
|
||||
removing 'path:$flake1Dir#packages.$system.default'
|
||||
removing 'foo'
|
||||
removed 2 packages, kept 0 packages
|
||||
EOF
|
||||
nix profile rollback
|
||||
|
||||
# Test removing package using full url.
|
||||
nix profile remove "path:$flake1Dir#packages.$system.default"
|
||||
[[ ! -f $TEST_HOME/.nix-profile/bin/hello ]]
|
||||
nix profile install $flake1Dir
|
||||
|
||||
# Test removing package using shorthand flake url.
|
||||
nix profile remove path:$flake1Dir
|
||||
[[ ! -f $TEST_HOME/.nix-profile/bin/hello ]]
|
||||
nix profile install $flake1Dir
|
||||
|
||||
# Test removing package using shorthand package name.
|
||||
nix profile remove path:$flake1Dir#default
|
||||
[[ ! -f $TEST_HOME/.nix-profile/bin/hello ]]
|
||||
nix profile install $flake1Dir
|
||||
|
||||
# Test 'history', 'diff-closures'.
|
||||
nix profile diff-closures
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue