Skip to content

Commit

Permalink
Update metacall.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga authored Jan 29, 2025
1 parent 88271cf commit c3f0445
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metacall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ def install
(testpath/"test.js").write <<~EOS
console.log("Hello from NodeJS")
EOS
(testpath/"test-port.js").write <<~EOS
require('metacall');
console.log("NodeJS Port");
EOS
Dir.mkdir(testpath/"typescript")
(testpath/"typescript/typedfunc.ts").write <<~EOS
'use strict';
Expand Down Expand Up @@ -223,6 +227,9 @@ def install
(testpath/"test.py").write <<~EOS
print("Hello from Python")
EOS
(testpath/"test-port.py").write <<~EOS
print("Python Port")
EOS
(testpath/"test.rb").write <<~EOS
print("Hello from Ruby")
EOS
Expand All @@ -239,6 +246,8 @@ def install
assert_match "Hello from Ruby", shell_output("#{bin}/metacall test.rb")
assert_match "Hello from NodeJS", shell_output("#{bin}/metacall test.js")
assert_match "54321", shell_output(testpath/"test_typescript.sh")
assert_match "NodeJS Port", shell_output("#{bin}/metacall test-port.js")
assert_match "Python Port", shell_output("#{bin}/metacall test-port.py")

# TODO: Enable Java
# assert_match "Hello from Java", shell_output("#{bin}/metacall test.java")
Expand Down

0 comments on commit c3f0445

Please sign in to comment.