Skip to content

Commit c3f0445

Browse files
authored
Update metacall.rb
1 parent 88271cf commit c3f0445

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

metacall.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def install
192192
(testpath/"test.js").write <<~EOS
193193
console.log("Hello from NodeJS")
194194
EOS
195+
(testpath/"test-port.js").write <<~EOS
196+
require('metacall');
197+
console.log("NodeJS Port");
198+
EOS
195199
Dir.mkdir(testpath/"typescript")
196200
(testpath/"typescript/typedfunc.ts").write <<~EOS
197201
'use strict';
@@ -223,6 +227,9 @@ def install
223227
(testpath/"test.py").write <<~EOS
224228
print("Hello from Python")
225229
EOS
230+
(testpath/"test-port.py").write <<~EOS
231+
print("Python Port")
232+
EOS
226233
(testpath/"test.rb").write <<~EOS
227234
print("Hello from Ruby")
228235
EOS
@@ -239,6 +246,8 @@ def install
239246
assert_match "Hello from Ruby", shell_output("#{bin}/metacall test.rb")
240247
assert_match "Hello from NodeJS", shell_output("#{bin}/metacall test.js")
241248
assert_match "54321", shell_output(testpath/"test_typescript.sh")
249+
assert_match "NodeJS Port", shell_output("#{bin}/metacall test-port.js")
250+
assert_match "Python Port", shell_output("#{bin}/metacall test-port.py")
242251

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

0 commit comments

Comments
 (0)