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>
36 lines
1.6 KiB
Batchfile
36 lines
1.6 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM T04 - ERRORI di connessione
|
|
REM Tre casi, tutti attesi -201 "Macchina non connessa":
|
|
REM a) IP inesistente
|
|
REM b) porta errata
|
|
REM c) credenziali errate
|
|
REM NOTA: il Connect fa una LIST su /PRG/. Se il controllo usa
|
|
REM una cartella programmi DIVERSA da /PRG/, anche con IP/cred
|
|
REM corretti la connessione FALLISCE (criticita C6: ProgramDirectory
|
|
REM e' hardcoded "/PRG/", nessun flag CLI per cambiarla).
|
|
REM ============================================================
|
|
setlocal
|
|
call "%~dp0config.bat"
|
|
if not exist "%RESULTS%" mkdir "%RESULTS%"
|
|
set LOG=%RESULTS%\t04_errori_connessione.log
|
|
echo === T04 ERRORI CONNESSIONE === > "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- a) IP inesistente 10.255.255.1 ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=10.255.255.1 -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%RESULTS%\dl_a.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_a=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- b) porta errata 9999 ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=9999 -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%RESULTS%\dl_b.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_b=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo. >> "%LOG%"
|
|
echo ----- c) credenziali errate ----- >> "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=%PORT% -username=NOUSER -password=NOPASS -path=%PROGNUM% -pathprogramma="%RESULTS%\dl_c.txt" >> "%LOG%" 2>&1
|
|
echo EXITCODE_c=%ERRORLEVEL% >> "%LOG%"
|
|
|
|
echo Log: %LOG%
|
|
type "%LOG%"
|
|
endlocal
|