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>
23 lines
1 KiB
Batchfile
23 lines
1 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM T01 - INVIO programma valido (happy path)
|
|
REM Carica samples\O0001_valid.nc sul CNC.
|
|
REM Atteso: Errore:0. Verificare che il file compaia su CNC.
|
|
REM OSSERVARE (criticita C2/C3): in quale cartella FTP finisce
|
|
REM il file (-path=%PROGNUM% -> path relativo "%PROGNUM%/O0001"
|
|
REM invece di "/PRG/O0001"?). Verificare anche se la validazione
|
|
REM blocca per "First line must be O####" a causa del \n iniziale
|
|
REM inserito da FanucProgram.Standardize (criticita C4).
|
|
REM ============================================================
|
|
setlocal
|
|
call "%~dp0config.bat"
|
|
if not exist "%RESULTS%" mkdir "%RESULTS%"
|
|
set LOG=%RESULTS%\t01_invia_valido.log
|
|
|
|
echo === T01 INVIO VALIDO === > "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Invia -ip=%IP% -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%~dp0samples\O0001_valid.nc" >> "%LOG%" 2>&1
|
|
echo EXITCODE=%ERRORLEVEL% >> "%LOG%"
|
|
echo EXITCODE=%ERRORLEVEL%
|
|
echo Log: %LOG%
|
|
type "%LOG%"
|
|
endlocal
|