ISS-018: FanucProgram.Standardize() prepends a leading '\n' to the
program body, so the O#### header is not on lines[0]. The validator
first-line check read lines[0] and always failed "First line must be
O####", rejecting every valid Fanuc/Mitsubishi upload. Scan the first
non-blank line instead. Upload (FOCAS tape) format unchanged.
ISS-019: field-test .bat files passed -pathprogramma unquoted; on
install paths with spaces ("visual studio prove") cmd split the arg and
ArgParser captured only the first token -> truncated path. Quote the
arg in all 7 scripts.
Add regression test Validate_LeadingBlankLineBeforeONumber for both
Fanuc and Mitsubishi.
Surfaced by field testing against a local docker FTP server.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39 lines
1.4 KiB
Batchfile
39 lines
1.4 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM T06 - Parametri mancanti / parsing
|
|
REM Attesi:
|
|
REM a) manca -azione -> -101 (NRE in ArgParser, vedi criticita C7)
|
|
REM b) manca -ip -> -102 parametri mancanti
|
|
REM c) manca -pathprogramma -> -102 (richiesto ANCHE per Scarica)
|
|
REM d) -help -> 0, stampa guida
|
|
REM NON usa rete: testabili anche offline.
|
|
REM ============================================================
|
|
setlocal
|
|
call "%~dp0config.bat"
|
|
if not exist "%RESULTS%" mkdir "%RESULTS%"
|
|
set LOG=%RESULTS%\t06_parametri.log
|
|
echo === T06 PARAMETRI MANCANTI === > "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- a) manca -azione ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -ip=%IP% -porta=%PORT% -pathprogramma="%RESULTS%\x.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_a=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- b) manca -ip ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -porta=%PORT% -pathprogramma="%RESULTS%\x.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_b=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- c) manca -pathprogramma ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=%PORT% >> "%LOG%" 2>&1
|
|
echo EXITCODE_c=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- d) -help ----- >> "%LOG%"
|
|
"%EXE%" -help >> "%LOG%" 2>&1
|
|
echo EXITCODE_d=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo Log: %LOG%
|
|
type "%LOG%"
|
|
endlocal
|