knotfiles/tests/integrate_test

34 lines
754 B
Plaintext
Executable File

#!/usr/bin/env nu
# integrate_test -- 运行集成测试
#
# Copyright (C) 2022 KAAAsS
def main [] {
print "开始运行集成测试"
rm -rf work/home/
mkdir work/home
./dotfiles install -H work/home --less
./dotfiles sync -H work/home -v
./dotfiles uninstall -H work/home --no-confirm
}
# 运行安装功能的集成测试
def "main install" [] {
rm -rf work/home/
mkdir work/home
./dotfiles install -H work/home -v
}
# 运行同步功能的集成测试
def "main sync" [] {
./dotfiles sync -H work/home -v
}
# 运行卸载功能的集成测试
def "main uninstall" [] {
rm -rf work/home/
mkdir work/home
./dotfiles install -H work/home --less
./dotfiles uninstall -H work/home --no-confirm
}