openmainframeproject / cobol-check

A testing framework for Cobol applications
Apache License 2.0
78 stars 28 forks source link

getting errors when trying to run test for simple fizzbuzz function #290

Closed johnathankahn closed 1 year ago

johnathankahn commented 1 year ago

image image what does this error mean and how to solve it

Rune-Christensen commented 1 year ago

Hi @johnathan2709 Thank you for your interest in COBOL Check. It appears you are running version 0.1.0, is it possible for you to upgrade to version 0.2.7? A lot of bugs are removed in the later version. Also, where did you get the version you are running, we might need to do some cleanup, to ensure that the correct version is distributed. Regards, Rune

johnathankahn commented 1 year ago

@Rune-Christensen I went to wiki and then under the download section, I clicked on "the project home page". from the download section of the neopragma page, I downloaded the latest release. image

johnathankahn commented 1 year ago

now it says "command not found" image

Rune-Christensen commented 1 year ago

Ok, thank you for the link. That page is very much out of date, I will remove the link to it.

Ok, I do not know the current command for running COBOL Check, but I can get that for you tomorrow.

Until then, do you know that there is a Visual Studio Code extension for COBOL Check? That might be easier for you to use?

sam94dion commented 1 year ago

@johnathan2709

Try: sudo -s ./cobol-check -p NUMBERS :)

johnathankahn commented 1 year ago

@sam94dion image

dakaa16 commented 1 year ago

Hi @johnathan2709 It's a problem regarding CRLF and LF. The linux scripts has been edited in Windows, and it seems we've mistakenly added a CRLF instead of LF. Linux don't understand the CRLF and interprets it as ^M, which becomes part of your path. Go to the cobolcheck script file and the scripts\linux_gnucobol_run_tests file and make sure that they are with LF. Hope this can get you going 😄.

johnathankahn commented 1 year ago

@dakaa16 image still the same issue. i have few questions. why there are two cobolcheck files ? image, what is the purpose of CC##99.cbl file? and do you know how to install gnucobol on windows ?

dakaa16 commented 1 year ago

DId you also change it in the cobolcheck script file? I was under the impression that you were working in linux, but if you are working in windows, you should not have to do anything to the linux scripts. The cobolcheck file, will run cobolcheck on mac/linux and the cobolcheck.cmd wil run cobolcheck on Windows. The CC##99.cbl file, is the COBOL program that is generated to run through your tests. The linux/windows_gnucobol_run_tests will then use GnuCOBOL to turn the CC##99.cbl into an executable file, and run it to get the test results. Get GnuCOBOL here If you are still experiencing problems, take a look at the wiki, to make sure you haven't missed anything. If this doesn't help, I'll try to look further into your problem 😃

johnathankahn commented 1 year ago

@dakaa16 I did went past the above error by running the command from cygwin terminal in windows. but I am getting yet another error. image

johnathankahn commented 1 year ago

image

It worked 🥳 the problem was that the directory which contained cobol-check repo consisted of spaces in its name that is 'D:\github repo' and apparently, cobol-check wasn't able to interpret the path. I am interested in knowing what caused this issue. image

dakaa16 commented 1 year ago

Hi @johnathan2709 Great that you got it to work and thank you for reporting the bug. It was known, but never documented. I've created a new issue #292 to cover the bug, so I will be closing this issue now.