tests/on-device: test vim, not vi (android can have vi)

This commit is contained in:
Alexander Sosedkin 2024-06-15 20:26:37 +02:00
parent da9596df88
commit 463e0f82a6
4 changed files with 15 additions and 15 deletions

View file

@ -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
@test 'default config can be switched into' {
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
}

View file

@ -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
@test 'flake + h-m + #134 overlays case work' {
# assertions to verify initial state is as expected
assert_command vi
assert_command vim
assert_no_command dash zsh
# set up / build / activate the configuration
@ -21,10 +21,10 @@ load lib
# test that both zsh (system) and dash (user) have appeared in $PATH
assert_command dash zsh
assert_no_command vi
assert_no_command vim
# check that reverting works too
switch_to_default_config
assert_command vi
assert_command vim
assert_no_command dash zsh
}

View file

@ -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
@ -7,7 +7,7 @@ function flake_example() {
local flake_file_name="$2"
# assertions to verify initial state is as expected
assert_command vi
assert_command vim
assert_no_command unzip
# set up / build / activate the configuration
@ -26,13 +26,13 @@ function flake_example() {
# test presence of several crucial commands
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_no_command vi
assert_no_command vim
# check that reverting works too
switch_to_default_config
assert_command vi
assert_command vim
assert_no_command unzip
}

View file

@ -16,7 +16,7 @@ teardown() {
@test 'using home-manager works' {
# assertions to verify initial state is as expected
assert_command vi
assert_command vim
assert_no_command dash
[[ ! -e ~/.config/example ]]
@ -33,8 +33,8 @@ teardown() {
# test common commands presence
assert_command nix-on-droid nix-shell bash
# test that vi has disappeared
assert_no_command vi
# test that vim has disappeared
assert_no_command vim
# test dash has appeared and works
assert_command dash
@ -44,7 +44,7 @@ teardown() {
# check that reverting works too
switch_to_default_config
assert_command vi
assert_command vim
assert_no_command unzip
# file will be still present because home-manager needs to be set up to remove old links