diff --git a/tests/cli/Dockerfile b/tests/cli/Dockerfile index b86118a..558867f 100644 --- a/tests/cli/Dockerfile +++ b/tests/cli/Dockerfile @@ -53,10 +53,18 @@ RUN echo "Running tests ${CACHE_INVALIDATE}" \ | grep -e 'function add(a, b)' -e 'function mult(a, b)' \ && printf "load py sum.py\ninspect\nexit" \ | metacallcli \ - | grep -e 'function sum(a, b, c)' + | grep -e 'function sum(a, b, c)' \ + && printf "Running port tests\n" \ + && metacallcli port-test.py \ + | grep "Python port works" \ + && metacallcli port-test.js \ + | grep "Node.js port works" \ + && metacallcli port-test.rb \ + | grep "Ruby port works" \ + || cat /root/metacall.log -# | grep -e 'function sum(a, b, c)' \ +# TODO: C# Loader # && printf "load cs say.cs\ninspect\nexit" \ -# | metacallcli || cat /root/metacall.log +# | metacallcli ENTRYPOINT ["sh", "-c"] diff --git a/tests/node/port-test.js b/tests/node/port-test.js new file mode 100644 index 0000000..322a969 --- /dev/null +++ b/tests/node/port-test.js @@ -0,0 +1,25 @@ +#!/usr/bin/env node + +/* + * MetaCall Distributable by Parra Studios + * Distributable infrastructure for MetaCall. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +const { metacall } = require('metacall'); + +console.log("Node.js port works"); diff --git a/tests/python/port-test.py b/tests/python/port-test.py new file mode 100644 index 0000000..2873742 --- /dev/null +++ b/tests/python/port-test.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 + +# +# MetaCall Distributable by Parra Studios +# Distributable infrastructure for MetaCall. +# +# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import metacall + +print("Python port works") diff --git a/tests/ruby/port-test.rb b/tests/ruby/port-test.rb new file mode 100644 index 0000000..3f75beb --- /dev/null +++ b/tests/ruby/port-test.rb @@ -0,0 +1,24 @@ +#!/usr/bin/env ruby + +# +# MetaCall Distributable by Parra Studios +# Distributable infrastructure for MetaCall. +# +# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# +# Licensed under the Apache License, Version 2.0 (the 'License'); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'metacall' + +puts "Ruby port works"