diff --git a/tests/jatr.nim b/tests/jatr.nim index 4cbd25b..8158719 100644 --- a/tests/jatr.nim +++ b/tests/jatr.nim @@ -1,3 +1,18 @@ +# Copyright 2020 Mattia Giambirtone +# +# 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. + + # Just Another Test Runner for running JAPL tests # a testrunner process diff --git a/tests/jats.nim b/tests/jats.nim index 94cdfbe..1151d3b 100644 --- a/tests/jats.nim +++ b/tests/jats.nim @@ -1,3 +1,17 @@ +# Copyright 2020 Mattia Giambirtone +# +# 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. + # Just Another Test Suite for running JAPL tests import nim/nimtests @@ -162,11 +176,10 @@ when isMainModule: if paramCount() > 0: if paramStr(1) == "-i": - writeFile("testresults.txt", getTotalLog()) - discard execShellCmd("less testresults.txt") - removeFile("testresults.txt") + when defined(posix): + discard execCmdEx(&"echo {getTotalLog()} | less") + else: + discard execCmdEx("echo {getTotalLog()} | more") if paramStr(1) == "-o": writeFile(paramStr(2), getTotalLog()) - - diff --git a/tests/testutils.nim b/tests/testutils.nim index 6501659..8499d69 100644 --- a/tests/testutils.nim +++ b/tests/testutils.nim @@ -1,3 +1,17 @@ +# Copyright 2020 Mattia Giambirtone +# +# 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. + # Common code from between the JAPL testing suites # (during transition from runtests -> Just Another Test Runner