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>
34 lines
1.5 KiB
Batchfile
34 lines
1.5 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM T07 - ROUND TRIP (Invia poi Scarica)
|
|
REM Carica O0001_valid.nc, poi prova a riscaricarlo.
|
|
REM ATTESO TEORICO: roundtrip OK.
|
|
REM ATTESO REALE (criticita C2 vs C1): l'INVIO scrive in path
|
|
REM relativo "%PROGNUM%/O0001" mentre lo SCARICO legge "/PRG/%PROGNUM%".
|
|
REM I due path NON coincidono -> il roundtrip via CLI probabilmente
|
|
REM FALLISCE o legge un file diverso. Documentare il comportamento
|
|
REM reale (dove finisce davvero il file, con ricognizione FTP).
|
|
REM ============================================================
|
|
setlocal
|
|
call "%~dp0config.bat"
|
|
if not exist "%RESULTS%" mkdir "%RESULTS%"
|
|
set LOG=%RESULTS%\t07_roundtrip.log
|
|
echo === T07 ROUNDTRIP === > "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- 1) INVIO O0001_valid ----- >> "%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_invio=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- 2) SCARICO %PROGNUM% ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%RESULTS%\roundtrip_out.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_scarico=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo Log: %LOG%
|
|
type "%LOG%"
|
|
if exist "%RESULTS%\roundtrip_out.txt" (
|
|
echo --- CONTENUTO RISCARICATO ---
|
|
type "%RESULTS%\roundtrip_out.txt"
|
|
)
|
|
endlocal
|