mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
tests/on-device: test vim, not vi (android can have vi)
This commit is contained in:
parent
da9596df88
commit
463e0f82a6
4 changed files with 15 additions and 15 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
load lib
|
load lib
|
||||||
|
|
||||||
@test 'default config can be switched into' {
|
@test 'default config can be switched into' {
|
||||||
switch_to_default_config
|
switch_to_default_config
|
||||||
|
|
||||||
assert_command nix-on-droid nix-shell bash vi find
|
assert_command nix-on-droid nix-shell bash vim find
|
||||||
assert_no_command dash xonsh zsh
|
assert_no_command dash xonsh zsh
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
load lib
|
load lib
|
||||||
|
|
||||||
@test 'flake + h-m + #134 overlays case work' {
|
@test 'flake + h-m + #134 overlays case work' {
|
||||||
# assertions to verify initial state is as expected
|
# assertions to verify initial state is as expected
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command dash zsh
|
assert_no_command dash zsh
|
||||||
|
|
||||||
# set up / build / activate the configuration
|
# set up / build / activate the configuration
|
||||||
|
|
@ -21,10 +21,10 @@ load lib
|
||||||
|
|
||||||
# test that both zsh (system) and dash (user) have appeared in $PATH
|
# test that both zsh (system) and dash (user) have appeared in $PATH
|
||||||
assert_command dash zsh
|
assert_command dash zsh
|
||||||
assert_no_command vi
|
assert_no_command vim
|
||||||
|
|
||||||
# check that reverting works too
|
# check that reverting works too
|
||||||
switch_to_default_config
|
switch_to_default_config
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command dash zsh
|
assert_no_command dash zsh
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
load lib
|
load lib
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ function flake_example() {
|
||||||
local flake_file_name="$2"
|
local flake_file_name="$2"
|
||||||
|
|
||||||
# assertions to verify initial state is as expected
|
# assertions to verify initial state is as expected
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command unzip
|
assert_no_command unzip
|
||||||
|
|
||||||
# set up / build / activate the configuration
|
# set up / build / activate the configuration
|
||||||
|
|
@ -26,13 +26,13 @@ function flake_example() {
|
||||||
# test presence of several crucial commands
|
# test presence of several crucial commands
|
||||||
assert_command nix-on-droid nix-shell bash
|
assert_command nix-on-droid nix-shell bash
|
||||||
|
|
||||||
# test that nano has replaced vi and unzip has appeared in $PATH
|
# test that nano has replaced vim and unzip has appeared in $PATH
|
||||||
assert_command nano unzip
|
assert_command nano unzip
|
||||||
assert_no_command vi
|
assert_no_command vim
|
||||||
|
|
||||||
# check that reverting works too
|
# check that reverting works too
|
||||||
switch_to_default_config
|
switch_to_default_config
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command unzip
|
assert_no_command unzip
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ teardown() {
|
||||||
|
|
||||||
@test 'using home-manager works' {
|
@test 'using home-manager works' {
|
||||||
# assertions to verify initial state is as expected
|
# assertions to verify initial state is as expected
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command dash
|
assert_no_command dash
|
||||||
[[ ! -e ~/.config/example ]]
|
[[ ! -e ~/.config/example ]]
|
||||||
|
|
||||||
|
|
@ -33,8 +33,8 @@ teardown() {
|
||||||
# test common commands presence
|
# test common commands presence
|
||||||
assert_command nix-on-droid nix-shell bash
|
assert_command nix-on-droid nix-shell bash
|
||||||
|
|
||||||
# test that vi has disappeared
|
# test that vim has disappeared
|
||||||
assert_no_command vi
|
assert_no_command vim
|
||||||
|
|
||||||
# test dash has appeared and works
|
# test dash has appeared and works
|
||||||
assert_command dash
|
assert_command dash
|
||||||
|
|
@ -44,7 +44,7 @@ teardown() {
|
||||||
|
|
||||||
# check that reverting works too
|
# check that reverting works too
|
||||||
switch_to_default_config
|
switch_to_default_config
|
||||||
assert_command vi
|
assert_command vim
|
||||||
assert_no_command unzip
|
assert_no_command unzip
|
||||||
|
|
||||||
# file will be still present because home-manager needs to be set up to remove old links
|
# file will be still present because home-manager needs to be set up to remove old links
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue