summaryrefslogtreecommitdiff
path: root/tests/opencode
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-01-23 12:09:13 -0800
committerGitHub <noreply@github.com>2026-01-23 12:09:13 -0800
commit469a6d81ebb8b827e284d4afb090c6c622d97747 (patch)
tree3794c5aa5cfd88c271667c8c228990019f022598 /tests/opencode
parent35d4fbcd0b31485d9a55f0ba96a51ae7fe78d382 (diff)
parent4b6cef98ac3ef1edfe4fae3db19522c6e5cd48f7 (diff)
Merge pull request #349 from obra/fix/opencode-issuesv4.1.1
fix(opencode): standardize on plugins/ directory, fix symlink docs
Diffstat (limited to 'tests/opencode')
-rwxr-xr-xtests/opencode/setup.sh14
-rwxr-xr-xtests/opencode/test-plugin-loading.sh8
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/opencode/setup.sh b/tests/opencode/setup.sh
index 4aea82e..0defde2 100755
--- a/tests/opencode/setup.sh
+++ b/tests/opencode/setup.sh
@@ -18,13 +18,13 @@ cp -r "$REPO_ROOT/lib" "$HOME/.config/opencode/superpowers/"
cp -r "$REPO_ROOT/skills" "$HOME/.config/opencode/superpowers/"
# Copy plugin directory
-mkdir -p "$HOME/.config/opencode/superpowers/.opencode/plugin"
-cp "$REPO_ROOT/.opencode/plugin/superpowers.js" "$HOME/.config/opencode/superpowers/.opencode/plugin/"
+mkdir -p "$HOME/.config/opencode/superpowers/.opencode/plugins"
+cp "$REPO_ROOT/.opencode/plugins/superpowers.js" "$HOME/.config/opencode/superpowers/.opencode/plugins/"
# Register plugin via symlink
-mkdir -p "$HOME/.config/opencode/plugin"
-ln -sf "$HOME/.config/opencode/superpowers/.opencode/plugin/superpowers.js" \
- "$HOME/.config/opencode/plugin/superpowers.js"
+mkdir -p "$HOME/.config/opencode/plugins"
+ln -sf "$HOME/.config/opencode/superpowers/.opencode/plugins/superpowers.js" \
+ "$HOME/.config/opencode/plugins/superpowers.js"
# Create test skills in different locations for testing
@@ -57,8 +57,8 @@ PROJECT_SKILL_MARKER_67890
EOF
echo "Setup complete: $TEST_HOME"
-echo "Plugin installed to: $HOME/.config/opencode/superpowers/.opencode/plugin/superpowers.js"
-echo "Plugin registered at: $HOME/.config/opencode/plugin/superpowers.js"
+echo "Plugin installed to: $HOME/.config/opencode/superpowers/.opencode/plugins/superpowers.js"
+echo "Plugin registered at: $HOME/.config/opencode/plugins/superpowers.js"
echo "Test project at: $TEST_HOME/test-project"
# Helper function for cleanup (call from tests or trap)
diff --git a/tests/opencode/test-plugin-loading.sh b/tests/opencode/test-plugin-loading.sh
index 11ae02b..052e9de 100755
--- a/tests/opencode/test-plugin-loading.sh
+++ b/tests/opencode/test-plugin-loading.sh
@@ -15,15 +15,15 @@ trap cleanup_test_env EXIT
# Test 1: Verify plugin file exists and is registered
echo "Test 1: Checking plugin registration..."
-if [ -L "$HOME/.config/opencode/plugin/superpowers.js" ]; then
+if [ -L "$HOME/.config/opencode/plugins/superpowers.js" ]; then
echo " [PASS] Plugin symlink exists"
else
- echo " [FAIL] Plugin symlink not found at $HOME/.config/opencode/plugin/superpowers.js"
+ echo " [FAIL] Plugin symlink not found at $HOME/.config/opencode/plugins/superpowers.js"
exit 1
fi
# Verify symlink target exists
-if [ -f "$(readlink -f "$HOME/.config/opencode/plugin/superpowers.js")" ]; then
+if [ -f "$(readlink -f "$HOME/.config/opencode/plugins/superpowers.js")" ]; then
echo " [PASS] Plugin symlink target exists"
else
echo " [FAIL] Plugin symlink target does not exist"
@@ -60,7 +60,7 @@ fi
# Test 5: Verify plugin JavaScript syntax (basic check)
echo "Test 5: Checking plugin JavaScript syntax..."
-plugin_file="$HOME/.config/opencode/superpowers/.opencode/plugin/superpowers.js"
+plugin_file="$HOME/.config/opencode/superpowers/.opencode/plugins/superpowers.js"
if node --check "$plugin_file" 2>/dev/null; then
echo " [PASS] Plugin JavaScript syntax is valid"
else