<?php

$bin = __DIR__ . "/bin/easycli";
require __DIR__ . '/vendor/autoload.php';

use Libs\BashExecutor;

echo "=== TESTE 1: Comando simples ===\n";
$result = BashExecutor::run("{$bin} polygon create-new-address");
print_r($result);

echo "\n=== TESTE 2: Listar arquivos ===\n";
$result = BashExecutor::run("ls -la");
print_r($result);

echo "\n=== TESTE 3: Comando inválido ===\n";
$result = BashExecutor::run("comando_inexistente");
print_r($result);

echo "\n=== TESTE 4: Teste de timeout ===\n";
$result = BashExecutor::run("sleep 5", 2);
print_r($result);
