Skip to content

Commit c48fd1a

Browse files
committed
Update console UI expectations for find controls
1 parent 8b58235 commit c48fd1a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/CodeIndex.Tests/ConsoleUiTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void PrintUsage_WithoutBanner_HidesAsciiArtAndEasterEggFlags()
7373
Assert.Contains("cdidx definition <query>|--query <query>|-- <query> [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--kind <kind>] [--visibility <v[,v]>] [--exclude-visibility <v[,v]>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--body] [--exact|--exact-name] [--count] [--since <datetime>]", output);
7474
Assert.Contains("cdidx references <query>|--query <query>|-- <query> [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--kind <kind>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--body] [--snippet-lines <n>] [--max-line-width <n>] [--exact|--exact-name] [--count]", output);
7575
Assert.Contains("cdidx inspect <query>|--query <query>|-- <query> [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--body] [--max-line-width <n>] [--exact|--exact-name]", output);
76-
Assert.Contains("--snippet-lines <n> Search snippet length (1-20, default: 8)", output);
76+
Assert.Contains("--snippet-lines <n> search/find snippet length (1-20, default: search 8; find 1)", output);
7777
Assert.Contains("--snippet-focus <mode> search only: long-line focus mode (leftmost|quality|proximity, default: quality)", output);
7878
Assert.Contains("--max-line-width <n> search/references/callers/callees/find/excerpt/impact/inspect only: clamp very long single-line snippet/context/excerpt payloads (`0` disables clamping; default: 512)", output);
7979
Assert.Contains("cdidx find <query> --path <glob>", output);
@@ -99,8 +99,8 @@ public void PrintUsage_WithoutBanner_HidesAsciiArtAndEasterEggFlags()
9999
Assert.Contains("--duration-format <format> Index elapsed time format: `auto` (default), `seconds`, or `hms`; JSON keeps raw elapsed_ms", output);
100100
Assert.Contains("--ascii Use ASCII spinner/progress glyphs", output);
101101
Assert.Contains("cdidx excerpt <path> --start <line> [--end <line>] [--before <n>] [--after <n>] [--max-line-width <n>] [--focus-line <line>] [--focus-column <n>] [--focus-length <n>] [--db <path>] [--json] [--verbose]", output);
102-
Assert.Contains("--focus-column <n> excerpt: column to keep centered when clamping (must be within the focused line)", output);
103-
Assert.Contains("--focus-line <line> excerpt: line whose focused column should stay visible", output);
102+
Assert.Contains("--focus-column <n> find/excerpt: focus a specific 1-based column", output);
103+
Assert.Contains("--focus-line <line> find/excerpt: focus a specific line", output);
104104
Assert.Contains("cdidx map [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--bytes]", output);
105105
Assert.Contains("cdidx symbols [query|--query <query>|-- <query>] [--name <name>] [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--kind <kind>] [--visibility <v[,v]>] [--exclude-visibility <v[,v]>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--exact|--exact-name] [--count] [--since <datetime>]", output);
106106
Assert.Contains("cdidx files [query|--query <query>|-- <query>] [--db <path>] [--json] [--verbose] [--limit <n>|--top <n>] [--lang <lang>] [--path <glob>] [--exclude-path <glob>] [--exclude-tests] [--count] [--since <datetime>] [--bytes]", output);
@@ -708,7 +708,7 @@ public void PrintCompletions_FishIncludesFindOptions()
708708
[Theory]
709709
[InlineData("bash")]
710710
[InlineData("zsh")]
711-
public void PrintCompletions_BashAndZshKeepFocusOptionsExcerptOnly(string shell)
711+
public void PrintCompletions_BashAndZshIncludeFindFocusOptions(string shell)
712712
{
713713
var output = ConsoleUi.GetCompletionScript(shell);
714714
Assert.Contains("find", output);
@@ -723,7 +723,7 @@ public void PrintCompletions_BashAndZshKeepFocusOptionsExcerptOnly(string shell)
723723
Assert.Contains("elif [ \"$cmd\" = \"excerpt\" ]; then", output);
724724
var findBranch = ExtractBetween(output, "if [ \"$cmd\" = \"find\" ]", "elif [ \"$cmd\" = \"excerpt\" ]; then");
725725
var excerptBranch = ExtractBetween(output, "elif [ \"$cmd\" = \"excerpt\" ]; then", "elif [ \"$cmd\" = \"references\" ]; then");
726-
Assert.DoesNotContain("--focus-column", findBranch);
726+
Assert.Contains("--focus-column", findBranch);
727727
Assert.Contains("--focus-column", excerptBranch);
728728
}
729729
else
@@ -732,7 +732,7 @@ public void PrintCompletions_BashAndZshKeepFocusOptionsExcerptOnly(string shell)
732732
Assert.Contains("elif [[ $subcmd == excerpt ]]; then", output);
733733
var findBranch = ExtractBetween(output, "if [[ $subcmd == find ]]; then", "elif [[ $subcmd == excerpt ]]; then");
734734
var excerptBranch = ExtractBetween(output, "elif [[ $subcmd == excerpt ]]; then", "elif [[ $subcmd == references ]]; then");
735-
Assert.DoesNotContain("focus-column", findBranch);
735+
Assert.Contains("focus-column", findBranch);
736736
Assert.Contains("focus-column", excerptBranch);
737737
}
738738
}

0 commit comments

Comments
 (0)