first commit
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
Tests / test (bash) (push) Has been cancelled
Tests / test (zsh) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled

This commit is contained in:
2025-12-02 09:02:03 +01:00
commit 24d36cbad4
27 changed files with 2781 additions and 0 deletions

43
tests/test_finish.bats Normal file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env bats
setup() {
# Install finishte.sh and run testing against the main branch
wget -qO- https://git.appmodel.nl/Tour/finish/raw/branch/main/docs/install.sh | bash -s -- main
# Source bashrc to make sure finishte is available in the current session
source ~/.bashrc
# Configure for local LM-Studio
finishte config set provider lmstudio
finishte config set endpoint http://localhost:1234/v1/chat/completions
finishte config set model darkidol-llama-3.1-8b-instruct-1.3-uncensored_gguf:2
}
teardown() {
# Remove finishte.sh installation
finishte remove -y
}
@test "which finishte returns something" {
run which finishte
[ "$status" -eq 0 ]
[ -n "$output" ]
}
@test "finishte returns a string containing finishte.sh (case insensitive)" {
run finishte
[ "$status" -eq 0 ]
[[ "$output" =~ [Aa]utocomplete\.sh ]]
}
@test "finishte config should have lmstudio provider" {
run finishte config
[ "$status" -eq 0 ]
[[ "$output" =~ lmstudio ]]
}
@test "finishte command 'ls # show largest files' should return something" {
run finishte command "ls # show largest files"
[ "$status" -eq 0 ]
[ -n "$output" ]
}