FakeClaude, test per area e renderer diviso in due file

- tests/FakeClaude: eseguibile finto 'claude' configurabile con variabili
  d'ambiente (registro di argomenti/cwd/stdin, output, exit code, ritardo),
  con le prove FK-01…FK-05.
- Test organizzati per livello (Gui/, Process/, Support/) e struttura
  descritta in TESTING.md.
- MarkdownView: la parte sulle immagini passa in MarkdownView.Images.cs
  (partial), senza cambiare il comportamento.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-15 16:00:25 +02:00
1 parent 51993dd0c8
commit 5870de6fda
14 files changed
+292 -119

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Doppio di test di `claude` (vedi docs/TESTING.md → FakeClaude): l'eseguibile si chiama `claude` per poterlo mettere nel PATH -->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>claude</AssemblyName>
<RootNamespace>FakeClaude</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+15
View File
@@ -0,0 +1,15 @@
using System.Text.Json;
// Configurazione e formato del registro: docs/TESTING.md → FakeClaude.
var stdin = Console.In.ReadToEnd(); // resta in attesa finché il chiamante non chiude stdin
if (Environment.GetEnvironmentVariable("FAKE_CLAUDE_LOG") is { Length: > 0 } log)
File.AppendAllText(log, JsonSerializer.Serialize(new { args, cwd = Directory.GetCurrentDirectory(), stdin }) + "\n");
if (int.TryParse(Environment.GetEnvironmentVariable("FAKE_CLAUDE_DELAY_MS"), out var delay) && delay > 0)
Thread.Sleep(delay);
if (Environment.GetEnvironmentVariable("FAKE_CLAUDE_OUT") is { } o) Console.Out.Write(o);
if (Environment.GetEnvironmentVariable("FAKE_CLAUDE_ERR") is { } e) Console.Error.Write(e);
return int.TryParse(Environment.GetEnvironmentVariable("FAKE_CLAUDE_EXIT"), out var code) ? code : 0;