Add copyright info

tweak the 'less' command usage for -i
This commit is contained in:
Productive2 2021-01-30 10:38:47 +01:00
parent deb52efe88
commit 1990fde212
3 changed files with 47 additions and 5 deletions

View File

@ -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

View File

@ -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())

View File

@ -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