using ClaudeDo.Ui.Views; using Xunit; namespace ClaudeDo.Ui.Tests.Views; public class InteractiveTerminalDropPathsTests { [Fact] public void Quotes_only_paths_with_spaces_and_ends_with_a_separator() { var text = InteractiveTerminalView.FormatDroppedPaths( new[] { @"C:\repo\a.cs", @"C:\my repo\b.cs" }); Assert.Equal("C:\\repo\\a.cs \"C:\\my repo\\b.cs\" ", text); } [Fact] public void Skips_items_without_a_local_path() { // IStorageItem.TryGetLocalPath() returns null for non-filesystem items (e.g. a virtual // shell folder) — those must not turn into empty quotes in the composer. Assert.Equal(@"C:\repo\a.cs ", InteractiveTerminalView.FormatDroppedPaths(new[] { null, @"C:\repo\a.cs", " " })); Assert.Equal(string.Empty, InteractiveTerminalView.FormatDroppedPaths(new string?[] { null })); Assert.Equal(string.Empty, InteractiveTerminalView.FormatDroppedPaths(null)); } }