diff --git a/build/distributions/cobol-check-0.2.8.zip b/build/distributions/cobol-check-0.2.8.zip index 97b14695..6913e6eb 100644 Binary files a/build/distributions/cobol-check-0.2.8.zip and b/build/distributions/cobol-check-0.2.8.zip differ diff --git a/scripts/linux_gnucobol_run_tests b/scripts/linux_gnucobol_run_tests deleted file mode 100755 index 0dd637d1..00000000 --- a/scripts/linux_gnucobol_run_tests +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Linux - compile and execute a test Cobol program -# -# Assumptions: -# -# GnuCOBOL 2.2 or later is installed and on the path. Its executable or alias or symlink is named "cobc". - -cobc -x $@ -name=$(echo "$1" | cut -f 1 -d '.') -"${name}" \ No newline at end of file diff --git a/scripts/windows_gnucobol_run_tests.cmd b/scripts/windows_gnucobol_run_tests.cmd deleted file mode 100644 index 94961874..00000000 --- a/scripts/windows_gnucobol_run_tests.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -rem Windows - compile and execute a test Cobol program -rem -rem Assumptions: -rem -rem GnuCOBOL 3.+ is installed and on the path. Its executable or alias or symlink is named "cobc". -cobc -x %* && "%~dpn1" diff --git a/src/main/java/org/openmainframeproject/cobolcheck/services/Config.java b/src/main/java/org/openmainframeproject/cobolcheck/services/Config.java index 72cca470..75a09df3 100644 --- a/src/main/java/org/openmainframeproject/cobolcheck/services/Config.java +++ b/src/main/java/org/openmainframeproject/cobolcheck/services/Config.java @@ -394,6 +394,9 @@ private static String getCorrectRunContext(String path){ if (path.startsWith(".") && path.length() > 0){ path = path.substring(1); } + if (path.length() > 0 && (path.startsWith("/") || path.substring(1,3).equals(":\\") || path.substring(1,3).equals(":/"))){ + return StringHelper.adjustPathString(path); + } return StringHelper.adjustPathString(PathHelper.endWithFileSeparator(runDirectory) + path); } return StringHelper.adjustPathString(path); diff --git a/src/main/java/org/openmainframeproject/cobolcheck/services/filehelpers/FileNameMatcher.java b/src/main/java/org/openmainframeproject/cobolcheck/services/filehelpers/FileNameMatcher.java index 4df600d1..b189ef19 100644 --- a/src/main/java/org/openmainframeproject/cobolcheck/services/filehelpers/FileNameMatcher.java +++ b/src/main/java/org/openmainframeproject/cobolcheck/services/filehelpers/FileNameMatcher.java @@ -29,7 +29,7 @@ public class FileNameMatcher extends SimpleFileVisitor { private boolean defaultToAllFiles = false; public FileNameMatcher(String pattern) { - if (pattern.length() == 0) { + if (pattern.length() == 0 || pattern.equals("null")) { defaultToAllFiles = true; } matcher = FileSystems.getDefault().getPathMatcher("glob:" + pattern); diff --git a/vs-code-extension/Cobol-check/config.properties b/vs-code-extension/Cobol-check/config.properties index 7785ca86..b527c511 100644 --- a/vs-code-extension/Cobol-check/config.properties +++ b/vs-code-extension/Cobol-check/config.properties @@ -51,9 +51,13 @@ cobolcheck.decimalPointIsComma = false cobolcheck.append.rules = null #--------------------------------------------------------------------------------------------------------------------- -# Path for the generated Cobol test code +# Path for the generated Cobol test code and the executeable file +# On Linux begin the path with a / to make it absolute and an x:\\ or x:/ to do he same on Windows. # Default: ./ #--------------------------------------------------------------------------------------------------------------------- +# cobolcheck.test.program.path = /home/myName/temp +# cobolcheck.test.program.path = c:\\Developer\\temp +# cobolcheck.test.program.path = c:/Developer/temp cobolcheck.test.program.path = Cobol-check #--------------------------------------------------------------------------------------------------------------------- diff --git a/vs-code-extension/Cobol-check/scripts/linux_gnucobol_run_tests b/vs-code-extension/Cobol-check/scripts/linux_gnucobol_run_tests index 0dd637d1..bed96b28 100755 --- a/vs-code-extension/Cobol-check/scripts/linux_gnucobol_run_tests +++ b/vs-code-extension/Cobol-check/scripts/linux_gnucobol_run_tests @@ -5,6 +5,7 @@ # # GnuCOBOL 2.2 or later is installed and on the path. Its executable or alias or symlink is named "cobc". +cd "$(dirname $1)" cobc -x $@ name=$(echo "$1" | cut -f 1 -d '.') -"${name}" \ No newline at end of file +"${name}" diff --git a/vs-code-extension/Cobol-check/scripts/windows_gnucobol_run_tests.cmd b/vs-code-extension/Cobol-check/scripts/windows_gnucobol_run_tests.cmd index 3bfb01c4..87ed777a 100644 --- a/vs-code-extension/Cobol-check/scripts/windows_gnucobol_run_tests.cmd +++ b/vs-code-extension/Cobol-check/scripts/windows_gnucobol_run_tests.cmd @@ -4,5 +4,7 @@ rem rem Assumptions: rem rem GnuCOBOL 3.+ is installed and on the path. Its executable or alias or symlink is named "cobc". - -cobc -x %* && %~n1 \ No newline at end of file +%~d1 +cd %~p1 +cobc -x %* +%~n1