Skip to content

Conversation

@playdohface
Copy link
Collaborator

Relates to #171

This adds support for runnables in tests with one level of nesting in test classes for Mac and Linux. For Windows there would still be a custom tasks.json required.

"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is just indentation

Copy link
Collaborator

@tartarughina tartarughina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the change and everything works as expected. Nice work!

Comment on lines +16 to +17
"label": "$ZED_CUSTOM_java_class_name.${ZED_CUSTOM_java_outer_class_name:}.$ZED_CUSTOM_java_method_name",
"command": "package=\"$ZED_CUSTOM_java_package_name\"; outer=\"${ZED_CUSTOM_java_outer_class_name:}\"; inner=\"$ZED_CUSTOM_java_class_name\"; method=\"$ZED_CUSTOM_java_method_name\"; sep=\"$\"; if [ -n \"$outer\" ]; then c=\"$outer$sep$inner\"; else c=\"$inner\"; fi; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$package.$c#$method\"; elif [ -f gradlew ]; then ./gradlew test --tests \"$package.$c.$method\"; else >&2 echo 'No build system found'; exit 1; fi;",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clarity improvement. Too bad we are limited to having everything inlined

@tartarughina tartarughina merged commit 3a1eac7 into zed-extensions:main Jan 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants