Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes committed Feb 2, 2021
1 parent 1b331a8 commit d9654fb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/shell/bazel/java_launcher_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ java_binary(
deps = [":hellolib"],
main_class = "hello.Hello",
)
java_library(
name = "hellolib%special%lib",
srcs = ["HelloLib.java"],
)
java_binary(
name = "hello_special",
srcs = ["Hello.java"],
deps = [":hellolib%special%lib"],
main_class = "hello.Hello",
)
EOF
bazel build //$pkg/java/hello:hello || fail "expected success"
${PRODUCT_NAME}-bin/$pkg/java/hello/hello >& "$TEST_log" || \
Expand All @@ -66,6 +76,15 @@ EOF
${PRODUCT_NAME}-bin/$pkg/java/hello/hello --classpath_limit=0 >& "$TEST_log" || \
fail "expected success"
expect_log "Hello World!"

bazel build //$pkg/java/hello:hello_special || fail "expected success"
${PRODUCT_NAME}-bin/$pkg/java/hello/hello_special >& "$TEST_log" || \
fail "expected success"
expect_log "Hello World!"

${PRODUCT_NAME}-bin/$pkg/java/hello/hello_special --classpath_limit=0 >& "$TEST_log" || \
fail "expected success"
expect_log "Hello World!"
}

run_suite "Java launcher tests"
Expand Down

0 comments on commit d9654fb

Please sign in to comment.