nc_program_manager/field-test/t06_parametri_mancanti.bat
Trentin Davide 3fd3047584 docs(test): add Mitsubishi field-test kit (scripts + criticità checklist)
Windows batch harness + extensive IT README for on-site Mitsubishi CNC
testing. Covers connect/invia/scarica/validator/offset/param scenarios.
Documents C1-C8 criticità found in code review:
- path mapping mismatch (download /PRG/<int> vs upload relative <path>/<name>)
- Standardize leading \n may trip validator first-line gate
- hardcoded /PRG/ ProgramDirectory, no CLI override
- Int16 -path limit, ASCII-only FTP, plaintext credentials

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 09:03:10 +02:00

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