patchbench / pilot /verified /rust.jsonl
rootxhacker's picture
pilot rust: verified 4
6723241 verified
Raw
History Blame Contribute Delete
36 kB
{"id": "patchbench-rust-real-0070", "language": "rust", "source": "real", "origin": "swe-bench-live-multilang", "upstream_instance_id": "eza-community__eza-1664", "repo": "eza-community/eza", "base_commit": "1e82e8630401272fbac3ffe1d4bc71bdc436df74", "issue_text": "feat: make --hyperlink work like --color and --icons with always,auto,never for piping\nI'd like to be able to pipe the output of eza with --hyperlink into a pipe and have the links suppressed like the colour and icons.\nbug: `--hyperlink` adds links when output is piped, should have always/auto/never\n`--hyperlink` should accept values of `always/auto[matic]/never`, just like `--classify`, `--color`, and `--icons`.\n\nCurrently, if you run `eza --hyperlink | pbcopy`, you get this:\n```\n\u001b]8;;file:///Users/jsu/test/foo\u001b\\foo\u001b]8;;\u001b\\\n\n```\n\n---\n\neza version: 0.22.1 [+git]\nShell: fish 4.0.2\nTerminal: Ghostty\nOS: macOS Sequoia 15.5\n", "hints_text": "I believe there was a PR in for this at one point. I'll try to either dig it up or tbh our handling of hyperlinks is changing soon(hopefully) but either way I'll keep this in mind :+1: \nThis may or may not be intended behavior if `--hyperlink` is currently interpreted as \"always\" but this was surprising to me:\r\n\r\n```shell\r\n$ touch foo bar\r\n$ eza --hyperlink | xargs -n 1\r\nar\r\noo\r\n\r\n```\r\n\r\nI encountered this because I alias `ls` to include the `--hyperlink` option or it probably would have been more obvious.\n#693 seems potentially related although I can't reproduce it.\nSee also https://github.com/eza-community/eza/issues/1156 on why the default may not be `auto` here\nLooks like both https://github.com/eza-community/eza/pull/1059 and https://github.com/eza-community/eza/pull/1664 were opened to implement `--hyperlink=auto/always/never`, and https://github.com/eza-community/eza/pull/746 is a superseded PR.\n\n\n\n", "gold_patch": "diff --git a/README.md b/README.md\nindex 2184bdf4d..fea6e62bf 100644\n--- a/README.md\n+++ b/README.md\n@@ -110,7 +110,7 @@ eza\u2019s options are almost, but not quite, entirely unlike `ls`\u2019s. Quick overv\n - **--colo[u]r-scale=(field)**: highlight levels of `field` distinctly(all, age, size)\n - **--color-scale-mode=(mode)**: use gradient or fixed colors in --color-scale. valid options are `fixed` or `gradient`\n - **--icons=(when)**: when to display icons (always, auto, never)\n-- **--hyperlink**: display entries as hyperlinks\n+- **--hyperlink=(when)**: when to display entries as hyperlinks (always, auto, never)\n - **--absolute=(mode)**: display entries with their absolute path (on, follow, off)\n - **-w**, **--width=(columns)**: set screen width in columns\n \ndiff --git a/completions/bash/eza b/completions/bash/eza\nindex dbecd8a91..f1033d10e 100644\n--- a/completions/bash/eza\n+++ b/completions/bash/eza\n@@ -18,6 +18,11 @@ _eza() {\n return\n ;;\n \n+ --hyperlink)\n+ mapfile -t COMPREPLY < <(compgen -W 'always automatic auto never' -- \"$cur\")\n+ return\n+ ;;\n+\n -L|--level)\n mapfile -t COMPREPLY < <(compgen -W '{0..9}' -- \"$cur\")\n return\ndiff --git a/completions/fish/eza.fish b/completions/fish/eza.fish\nindex e3488239f..98e538b13 100644\n--- a/completions/fish/eza.fish\n+++ b/completions/fish/eza.fish\n@@ -37,7 +37,12 @@ complete -c eza -l icons -d \"When to display icons\" -x -a \"\n never\\t'Never display icons'\n \"\n complete -c eza -l no-quotes -d \"Don't quote file names with spaces\"\n-complete -c eza -l hyperlink -d \"Display entries as hyperlinks\"\n+complete -c eza -l hyperlink -d \"When to display entries as hyperlinks\" -x -a \"\n+ always\\t'Always display entries as hyperlinks'\n+ auto\\t'Display hyperlinks if standard output is a terminal'\n+ automatic\\t'Display hyperlinks if standard output is a terminal'\n+ never\\t'Never display entries as hyperlinks'\n+\"\n complete -c eza -l follow-symlinks -d \"Drill down into symbolic links that point to directories\"\n complete -c eza -l absolute -d \"Display entries with their absolute path\" -x -a \"\n on\\t'Show absolute path for listed entries'\ndiff --git a/completions/nush/eza.nu b/completions/nush/eza.nu\nindex 3830fd9f1..6558c9189 100644\n--- a/completions/nush/eza.nu\n+++ b/completions/nush/eza.nu\n@@ -17,7 +17,7 @@ export extern \"eza\" [\n --colour-scale-mode # Use gradient or fixed colors in --colour-scale\n --icons # When to display icons\n --no-quotes # Don't quote file names with spaces\n- --hyperlink # Display entries as hyperlinks\n+ --hyperlink # When to display entries as hyperlinks\n --absolute # Display entries with their absolute path\n --follow-symlinks # Drill down into symbolic links that point to directories\n --group-directories-first # Sort directories before other files\ndiff --git a/completions/pwsh/_eza.ps1 b/completions/pwsh/_eza.ps1\nindex 51f647296..b7d3fd703 100644\n--- a/completions/pwsh/_eza.ps1\n+++ b/completions/pwsh/_eza.ps1\n@@ -77,6 +77,11 @@ Register-ArgumentCompleter -Native -CommandName 'eza' -ScriptBlock {\n ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, \"ParameterValue\", $_)}\n break\n }\n+ '*;--hyperlink' {\n+ $ArrayWhen | \n+ ForEach-Object {[System.Management.Automation.CompletionResult]::new($_, $_, \"ParameterValue\", $_)}\n+ break\n+ }\n '*;--all' {\n [CompletionResult]::new('--show-symlinks' ,'listfilessyl' , [CompletionResultType]::ParameterName, 'explicitly show symbolic links (for use with --only-dirs | --only-files)')\n [CompletionResult]::new('--no-symlinks' ,'listfilessyl' , [CompletionResultType]::ParameterName, 'do not show symbolic links')\n@@ -158,7 +163,7 @@ Register-ArgumentCompleter -Native -CommandName 'eza' -ScriptBlock {\n # [CompletionResult]::new('--colour-scale-mode' ,'colorscalemode' , [CompletionResultType]::ParameterName, 'use gradient or fixed colors in --color-scale (fixed, gradient)')\n [CompletionResult]::new('--icons' ,'icons' , [CompletionResultType]::ParameterName, 'when to display icons (always, auto, never)')\n [CompletionResult]::new('--no-quotes' ,'noquotes' , [CompletionResultType]::ParameterName, 'don''t quote file names with spaces')\n- [CompletionResult]::new('--hyperlink' ,'hyperlink' , [CompletionResultType]::ParameterName, 'display entries as hyperlinks')\n+ [CompletionResult]::new('--hyperlink' ,'hyperlink' , [CompletionResultType]::ParameterName, 'when to display entries as hyperlinks (always, auto, never)')\n [CompletionResult]::new('--absolute' ,'absolute' , [CompletionResultType]::ParameterName, 'display entries with their absolute path (on, follow, off)')\n [CompletionResult]::new('--follow-symlinks' ,'followsymlinks' , [CompletionResultType]::ParameterName, 'drill down into symbolic links that point to directories')\n # [CompletionResult]::new('-w' ,'widths' , [CompletionResultType]::ParameterName, 'set screen width in columns')\ndiff --git a/completions/zsh/_eza b/completions/zsh/_eza\nindex 9636fe254..c5b95aaa3 100644\n--- a/completions/zsh/_eza\n+++ b/completions/zsh/_eza\n@@ -25,7 +25,7 @@ __eza() {\n --colo{,u}r-scale-mode\"[Use gradient or fixed colors in --color-scale]:(mode):(fixed gradient)\" \\\n --icons=\"[When to display icons]:(when):(always auto automatic never)\" \\\n --no-quotes\"[Don't quote filenames with spaces]\" \\\n- --hyperlink\"[Display entries as hyperlinks]\" \\\n+ --hyperlink=\"[When to display entries as hyperlinks]:(when):(always auto automatic never)\" \\\n --absolute\"[Display entries with their absolute path]:(mode):(on follow off)\" \\\n --follow-symlinks\"[Drill down into symbolic links that point to directories]\" \\\n --group-directories-first\"[Sort directories before other files]\" \\\ndiff --git a/man/eza.1.md b/man/eza.1.md\nindex 4daeac48b..dc14382fb 100644\n--- a/man/eza.1.md\n+++ b/man/eza.1.md\n@@ -123,9 +123,14 @@ When used without a value, defaults to \u2018`automatic`\u2019.\n `--no-quotes`\n : Don't quote file names with spaces.\n \n-`--hyperlink`\n+`--hyperlink=WHEN`\n : Display entries as hyperlinks\n \n+Valid settings are \u2018`always`\u2019, \u2018`automatic`\u2019 (\u2018`auto`\u2019 for short), and \u2018`never`\u2019.\n+When used without a value, defaults to \u2018`automatic`\u2019.\n+\n+`automatic` or `auto` will display hyperlinks only when the standard output is connected to a real terminal. If `eza` is ran while in a `tty`, or the output of `eza` is either redirected to a file or piped into another program, hyperlinks will not be used. Setting this option to \u2018`always`\u2019 causes `eza` to always display hyperlinks, while \u2018`never`\u2019 disables the use of hyperlinks.\n+\n `-w`, `--width=COLS`\n : Set screen width in columns.\n \ndiff --git a/src/options/file_name.rs b/src/options/file_name.rs\nindex 700b90804..f591df6c1 100644\n--- a/src/options/file_name.rs\n+++ b/src/options/file_name.rs\n@@ -95,10 +95,10 @@ impl QuoteStyle {\n \n impl EmbedHyperlinks {\n fn deduce(matches: &ArgMatches) -> Self {\n- if matches.get_flag(\"hyperlink\") {\n- Self::On\n- } else {\n- Self::Off\n+ match matches.get_one(\"hyperlink\") {\n+ Some(ShowWhen::Never) | None => Self::Never,\n+ Some(ShowWhen::Always) => Self::Always,\n+ Some(ShowWhen::Auto) => Self::Automatic,\n }\n }\n }\n@@ -149,18 +149,34 @@ mod tests {\n }\n \n #[test]\n- fn deduce_embed_hyperlinks_on() {\n+ fn deduce_embed_hyperlinks_auto() {\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\"])),\n- EmbedHyperlinks::On\n+ EmbedHyperlinks::Automatic\n+ );\n+ assert_eq!(\n+ EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"auto\"])),\n+ EmbedHyperlinks::Automatic\n+ );\n+ }\n+\n+ #[test]\n+ fn deduce_embed_hyperlinks_always() {\n+ assert_eq!(\n+ EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"always\"])),\n+ EmbedHyperlinks::Always\n );\n }\n \n #[test]\n- fn deduce_embed_hyperlinks_off() {\n+ fn deduce_embed_hyperlinks_never() {\n+ assert_eq!(\n+ EmbedHyperlinks::deduce(&mock_cli(vec![\"--hyperlink\", \"never\"])),\n+ EmbedHyperlinks::Never\n+ );\n assert_eq!(\n EmbedHyperlinks::deduce(&mock_cli(vec![\"\"])),\n- EmbedHyperlinks::Off\n+ EmbedHyperlinks::Never\n );\n }\n \n@@ -254,7 +270,7 @@ mod tests {\n classify: Classify::JustFilenames,\n show_icons: ShowIcons::Never,\n quote_style: QuoteStyle::QuoteSpaces,\n- embed_hyperlinks: EmbedHyperlinks::Off,\n+ embed_hyperlinks: EmbedHyperlinks::Never,\n absolute: Absolute::Off,\n is_a_tty: true,\n })\ndiff --git a/src/options/parser.rs b/src/options/parser.rs\nindex 526188a9f..231c27968 100644\n--- a/src/options/parser.rs\n+++ b/src/options/parser.rs\n@@ -85,7 +85,10 @@ pub fn get_command() -> clap::Command {\n .num_args(0..=1)\n .value_parser(value_parser!(ShowWhen))\n .default_missing_value(\"auto\"))\n- .arg(arg!(--hyperlink \"display entries as hyperlinks\"))\n+ .arg(arg!(--hyperlink <WHEN> \"when to display entries as hyperlinks\")\n+ .num_args(0..=1)\n+ .value_parser(value_parser!(ShowWhen))\n+ .default_missing_value(\"auto\"))\n .arg(arg!(--\"no-quotes\" \"don't quote file names with spaces\"))\n \n .next_help_heading(\"FILTERING OPTIONS\")\ndiff --git a/src/output/file_name.rs b/src/output/file_name.rs\nindex 6e14e2067..bbb8a7c98 100644\n--- a/src/output/file_name.rs\n+++ b/src/output/file_name.rs\n@@ -121,8 +121,14 @@ pub enum ShowIcons {\n /// Whether to embed hyperlinks.\n #[derive(PartialEq, Eq, Debug, Copy, Clone)]\n pub enum EmbedHyperlinks {\n- Off,\n- On,\n+ /// Never embed hyperlinks, even when output is going to a terminal.\n+ Never,\n+\n+ /// Embed hyperlinks automatically, based on the output destination.\n+ Automatic,\n+\n+ /// Always embed hyperlinks, even when the output isn't going to a terminal.\n+ Always,\n }\n \n /// Whether to show absolute paths\n@@ -275,7 +281,7 @@ impl<C: Colours> FileName<'_, '_, C> {\n classify: Classify::JustFilenames,\n quote_style: QuoteStyle::QuoteSpaces,\n show_icons: ShowIcons::Never,\n- embed_hyperlinks: EmbedHyperlinks::Off,\n+ embed_hyperlinks: EmbedHyperlinks::Never,\n is_a_tty: self.options.is_a_tty,\n absolute: Absolute::Off,\n };\n@@ -413,7 +419,12 @@ impl<C: Colours> FileName<'_, '_, C> {\n let mut bits = Vec::new();\n \n let mut display_hyperlink = false;\n- if self.options.embed_hyperlinks == EmbedHyperlinks::On\n+ let should_embed_hyperlinks = match self.options.embed_hyperlinks {\n+ EmbedHyperlinks::Never => false,\n+ EmbedHyperlinks::Automatic => self.options.is_a_tty,\n+ EmbedHyperlinks::Always => true,\n+ };\n+ if should_embed_hyperlinks\n && let Some(abs_path) = self\n .file\n .absolute_path()\n", "test_patch": "diff --git a/powertest.yaml b/powertest.yaml\nindex ce637a30a..b9401c655 100644\n--- a/powertest.yaml\n+++ b/powertest.yaml\n@@ -69,6 +69,12 @@ commands:\n ? - null\n - --hyperlink\n :\n+ ? - null\n+ - --hyperlink\n+ : values:\n+ - auto\n+ - always\n+ - never\n ? - null\n - --absolute\n : values:\ndiff --git a/tests/ptests/ptest_2439b7d68089135b.stdout b/tests/ptests/ptest_2439b7d68089135b.stdout\nindex b3996abef..5bd9aa127 100644\n--- a/tests/ptests/ptest_2439b7d68089135b.stdout\n+++ b/tests/ptests/ptest_2439b7d68089135b.stdout\n@@ -26,7 +26,7 @@ DISPLAY OPTIONS:\n --color-scale [<FIELDS>...] highlight value of FIELDS distinctly [possible values: all, age, size]\n --color-scale-mode <MODE> mode for --color-scale [default: gradient] [possible values: fixed, gradient]\n --icons [<WHEN>] when to display icons [possible values: always, auto, never]\n- --hyperlink display entries as hyperlinks\n+ --hyperlink [<WHEN>] when to display entries as hyperlinks [possible values: always, auto, never]\n --no-quotes don't quote file names with spaces\n \n FILTERING OPTIONS:\ndiff --git a/tests/ptests/ptest_295b1dd87a9bb792.toml b/tests/ptests/ptest_295b1dd87a9bb792.toml\nnew file mode 100644\nindex 000000000..8cdceb2f3\n--- /dev/null\n+++ b/tests/ptests/ptest_295b1dd87a9bb792.toml\n@@ -0,0 +1,2 @@\n+bin.name = \"eza\"\n+args = \"tests/test_dir --hyperlink never\"\n\\ No newline at end of file\ndiff --git a/tests/ptests/ptest_a689ab7558716dda.stderr b/tests/ptests/ptest_a689ab7558716dda.stderr\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/tests/ptests/ptest_a689ab7558716dda.stdout b/tests/ptests/ptest_a689ab7558716dda.stdout\ndeleted file mode 100644\nindex 9272823fb..000000000\n--- a/tests/ptests/ptest_a689ab7558716dda.stdout\n+++ /dev/null\n@@ -1,9 +0,0 @@\n-\u001b]8;;file://[CWD]/tests/test_dir/git\u001b/git\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/grid\u001b/grid\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/group\u001b/group\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/icons\u001b/icons\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/perms\u001b/perms\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/size\u001b/size\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/specials\u001b/specials\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/symlinks\u001b/symlinks\u001b]8;;\u001b/\n-\u001b]8;;file://[CWD]/tests/test_dir/time\u001b/time\u001b]8;;\u001b/\ndiff --git a/tests/ptests/ptest_a689ab7558716dda.toml b/tests/ptests/ptest_a689ab7558716dda.toml\ndeleted file mode 100644\nindex c870e345c..000000000\n--- a/tests/ptests/ptest_a689ab7558716dda.toml\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-bin.name = \"eza\"\n-args = \"tests/test_dir --hyperlink \"\n\\ No newline at end of file\ndiff --git a/tests/ptests/ptest_bba388583551f506.toml b/tests/ptests/ptest_bba388583551f506.toml\nnew file mode 100644\nindex 000000000..f277bfa81\n--- /dev/null\n+++ b/tests/ptests/ptest_bba388583551f506.toml\n@@ -0,0 +1,2 @@\n+bin.name = \"eza\"\n+args = \"tests/test_dir --hyperlink always\"\n\\ No newline at end of file\ndiff --git a/tests/ptests/ptest_e8471ce10a208fd.toml b/tests/ptests/ptest_e8471ce10a208fd.toml\nnew file mode 100644\nindex 000000000..937707e81\n--- /dev/null\n+++ b/tests/ptests/ptest_e8471ce10a208fd.toml\n@@ -0,0 +1,2 @@\n+bin.name = \"eza\"\n+args = \"tests/test_dir --hyperlink auto\"\n\\ No newline at end of file\n", "fail_to_pass": ["options::file_name::tests::deduce_embed_hyperlinks_always", "options::file_name::tests::deduce_embed_hyperlinks_never", "options::file_name::tests::deduce_embed_hyperlinks_auto"], "pass_to_pass": ["options::theme::tests::deduce_use_colors_auto", "output::render::octal::test::sticky3", "output::render::blocks::test::file_decimal", "theme::customs_test::exa_bu", "theme::lsc::ansi_test::bold2", "theme::customs_test::ls_bd", "output::render::permissions_unix::test::specials", "output::render::users::test::different_named", "theme::customs_test::exa_so", "options::filter::tests::deduce_dot_filter_tree_all_all", "options::dir_action::tests::deduce_dir_action_tree_as_file_conflict", "options::filter::tests::deduce_sort_field_cr", "options::view::tests::deduce_time_style_non_recent_and_recent", "theme::lsc::test::both", "fs::file::ext_test::extension", "fs::file::filename_test::no_path", "theme::customs_test::exa_nm", "fs::file::filename_test::here", "theme::customs_test::exa_ux", "output::render::groups::test::secondary", "theme::customs_test::exa_St", "output::render::links::test::popular_file", "theme::customs_test::exa_uw", "theme::customs_test::ls_di", "output::render::links::test::regular_directory", "options::view::tests::deduce_color_scale_size_luminance_60_gradient", "theme::lsc::ansi_test::rgbi", "theme::customs_test::exa_mak", "options::dir_action::tests::deduce_dir_action_tree_level", "theme::customs_test::exa_tx", "output::render::inode::test::blocklessness", "output::render::size::test::file_decimal", "theme::customs_test::exa_gm", "options::filter::tests::deduce_sort_field_name_mix_hidden", "fs::file::ext_test::no_extension", "output::time::test::short_month_width_japanese", "options::view::tests::deduce_time_style_long_iso_arg", "output::render::octal::test::normal_folder", "options::filter::tests::deduce_ignore_patterns_empty", "output::render::groups::test::smart", "theme::lsc::ansi_test::word", "options::dir_action::tests::deduce_recurse_options_no_level", "theme::customs_test::ls_exa_fi", "theme::customs_test::exa_su", "theme::lsc::test::cyan", "fs::file::filename_test::there", "options::view::tests::deduce_time_types_accessed_word", "theme::lsc::test::under", "theme::customs_test::ls_or", "options::config::tests::parse_color_code_from_string", "theme::customs_test::ls_gu", "options::filter::tests::deduce_ignore_patterns_one", "options::theme::tests::deduce_definitions", "theme::lsc::test::starts", "options::view::tests::deduce_terminal_width_set_arg", "theme::customs_test::exa_sf", "theme::customs_test::ls_txt_exa_fi", "options::parser::test::deduce_files", "options::filter::tests::deduce_git_ignore_on", "options::view::tests::deduce_details_long_strict_one_line", "theme::customs_test::exa_bo", "theme::customs_test::exa_do", "output::render::links::test::regular_file", "cli_all_tests", "options::view::tests::deduce_details_options_tree_mounts", "theme::customs_test::exa_ub", "options::config::tests::parse_long_hex_color_from_string", "options::filter::tests::deduce_sort_field_age", "theme::lsc::test::ends", "theme::customs_test::exa_um", "options::view::tests::deduce_mode_grid_across", "output::cell::width_unit_test::addition_usize", "options::filter::tests::deduce_sort_field_name_mix_hidden_case", "theme::customs_test::exa_un", "theme::customs_test::exa_tm", "theme::customs_test::exa_pi", "options::view::tests::deduce_user_format_off", "theme::customs_test::ls_uu", "theme::lsc::ansi_test::hibo", "theme::lsc::test::more", "theme::customs_test::ls_exa_ex", "options::dir_action::tests::deduce_dir_action_recurse", "theme::customs_test::exa_xx", "options::dir_action::tests::deduce_dir_action_tree_level_conflict", "theme::lsc::ansi_test::bold", "output::render::size::test::file_bytes", "options::dir_action::tests::deduce_dir_action_list", "theme::customs_test::exa_in", "options::config::tests::parse_none_color_from_string", "theme::lsc::ansi_test::bfg2", "theme::customs_test::ls_un", "theme::lsc::ansi_test::bfg", "theme::customs_test::ls_txt", "theme::customs_test::exa_lm", "theme::customs_test::exa_fi", "options::view::tests::deduce_details_options_tree", "options::filter::tests::deduce_dot_filter_dotfiles_and_dots", "theme::lsc::ansi_test::fg", "theme::customs_test::exa_Sl", "fs::filter::test_ignores::ignores_an_exact_filename", "theme::lsc::test::equals", "output::tree::iter_test::test_iteration", "theme::customs_test::exa_gc", "theme::customs_test::exa_ng", "theme::customs_test::exa_sb", "options::theme::tests::deduce_use_colors_no_color_env", "theme::customs_test::exa_hd", "tests/cmd/absolute_recurse_unix.toml", "theme::customs_test::exa_Sn", "theme::lsc::ansi_test::hibg", "options::view::tests::deduce_time_style_full_iso_arg", "options::view::tests::deduce_details_options_tree_xattr", "theme::customs_test::exa_co", "options::file_name::tests::deduce_classify_just_filenames", "theme::customs_test::exa_oc", "options::view::tests::deduce_time_types_created_word", "options::theme::tests::deduce_use_colors_no_color_arg", "theme::customs_test::exa_cm", "theme::lsc::test::jibber", "options::file_name::tests::deduce_show_icon_always", "options::view::tests::deduce_grid_options", "options::view::tests::deduce_time_style_custom_env", "theme::customs_test::exa_gi", "fs::filter::test_ignores::ignores_a_glob", "options::file_name::tests::deduce_classify_file_indicators", "theme::lsc::test::many", "theme::lsc::test::purple", "options::filter::tests::deduce_sort_field_time", "options::file_name::tests::deduce_show_icons_width", "output::tree::trunk_test::empty_at_first", "theme::lsc::test::bold", "output::render::users::test::unnamed", "theme::lsc::ansi_test::hiund", "options::view::tests::deduce_mode_grid", "options::filter::tests::deduce_sort_field_acc", "options::filter::tests::deduce_file_filter_reverse", "theme::customs_test::exa_gw", "options::file_name::tests::deduce_show_icons_never", "theme::customs_test::exa_ds", "theme::customs_test::exa_bl", "theme::lsc::ansi_test::rgbbg", "theme::customs_test::ls_exa_multi", "options::theme::tests::deduce_use_colors_always", "theme::customs_test::exa_cr", "theme::customs_test::ls_multi", "theme::customs_test::ls_fi_ls_txt", "output::render::blocks::test::file_bytes", "theme::lsc::ansi_test::nines", "theme::customs_test::exa_or", "theme::lsc::ansi_test::toohi", "theme::customs_test::exa_ut", "options::file_name::tests::deduce_quote_style_no_quotes", "output::tree::trunk_test::two_times_two_children", "theme::customs_test::exa_Su", "options::view::tests::deduce_size_format_off", "theme::lsc::ansi_test::unde2", "cli_unix_tests", "theme::lsc::ansi_test::fgbg", "fs::file::filename_test::everywhere", "theme::lsc::test::green", "options::view::tests::deduce_time_style_iso_env", "options::file_name::tests::deduce_show_icons_never_no_arg_env", "theme::customs_test::exa_cd", "options::view::tests::deduce_terminal_width_automatic", "theme::customs_test::exa_vi", "theme::lsc::ansi_test::bgfg", "theme::customs_test::exa_gu", "theme::customs_test::exa_Sr", "output::render::blocks::test::directory", "theme::customs_test::ls_cd", "options::dir_action::tests::deduce_dir_action_recurse_as_file_conflict", "output::cell::width_unit_test::addition", "options::view::tests::deduce_time_types_default", "options::file_name::tests::deduce_show_icons_never_no_arg", "tests/cmd/absolute_file_all.toml", "theme::customs_test::exa_ln", "options::filter::tests::deduce_sort_field_old", "options::filter::tests::deduce_sort_field_extension", "theme::customs_test::ls_ln", "fs::file::filename_test::topmost", "options::view::tests::deduce_time_types_accessed", "theme::customs_test::exa_sp", "output::tree::trunk_test::two_times_two_nested_children", "theme::customs_test::exa_nk", "options::view::tests::deduce_group_format_off", "theme::customs_test::ls_mp3", "theme::customs_test::exa_tw", "options::config::tests::parse_short_hex_color_from_string", "theme::customs_test::exa_gd", "theme::customs_test::ls_mak", "options::view::tests::deduce_time_style_long_iso_env", "options::filter::tests::deduce_sort_field_extension_case", "tests/cmd/absolute_unix.toml", "options::view::tests::deduce_group_format_on", "theme::customs_test::exa_ex", "theme::customs_test::exa_gn", "theme::lsc::ansi_test::both", "options::filter::tests::deduce_file_filter_only_files", "options::filter::tests::deduce_dot_filter_dotfiles", "options::filter::tests::deduce_sort_field_name", "output::render::groups::test::unnamed", "output::render::octal::test::sticky1", "theme::customs_test::exa_gt", "options::filter::tests::deduce_sort_field_default", "src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::is_none (line 27)", "theme::lsc::ansi_test::again", "output::render::groups::test::named", "theme::customs_test::exa_gv", "options::filter::tests::deduce_file_filter_only_dirs", "theme::customs_test::exa_ff", "options::view::tests::deduce_time_types_modified_word", "theme::customs_test::exa_ur", "options::dir_action::tests::deduce_dir_action_as_file", "output::render::groups::test::overflow", "output::render::git::test::git_new_changed", "theme::customs_test::exa_sc", "theme::lsc::test::blue", "theme::customs_test::exa_lo", "output::cell::width_unit_test::test_string", "options::view::tests::deduce_time_types_changed_word", "theme::customs_test::ls_ex", "theme::lsc::ansi_test::rgb", "output::tree::iter_test::test_empty", "theme::customs_test::ls_overwrite", "options::filter::tests::deduce_git_ignore_off", "output::render::octal::test::sticky2", "theme::customs_test::exa_bd", "theme::customs_test::exa_cc", "theme::customs_test::exa_ue", "output::render::octal::test::secret_file", "theme::customs_test::exa_mu", "options::filter::tests::deduce_ignore_patterns_error", "tests/cmd/follow-symlinks_unix.toml", "options::filter::tests::deduce_sort_field_err", "options::view::tests::deduce_time_types_no_time", "options::view::tests::deduce_details_long_strict_across", "options::filter::tests::deduce_dot_filter_just_files", "theme::customs_test::exa_tr", "output::render::users::test::different_unnamed", "options::view::tests::deduce_terminal_width_set_env", "options::view::tests::deduce_user_format_bytes", "options::filter::tests::deduce_sort_field_size", "theme::lsc::ansi_test::both2", "tests/cmd/basic_all.toml", "options::view::tests::deduce_color_scale_size_age_luminance_99_fixed", "options::view::tests::deduce_time_types_changed", "theme::customs_test::exa_df", "options::file_name::tests::deduce_show_icons_width_error", "options::filter::tests::deduce_sort_field_ch", "options::view::tests::deduce_time_style_iso_arg", "fs::file::filename_test::file", "theme::lsc::ansi_test::empty", "theme::customs_test::exa_uk", "theme::customs_test::exa_ga", "theme::customs_test::ls_five", "theme::customs_test::exa_ie", "output::cell::width_unit_test::empty_string", "theme::customs_test::exa_im", "output::tree::trunk_test::one_child", "theme::customs_test::exa_lc", "options::config::tests::parse_fixed_color_from_string", "theme::customs_test::exa_nb", "theme::lsc::test::red", "theme::customs_test::exa_uu", "theme::customs_test::exa_nt", "fs::filter::test_ignores::ignores_both", "output::render::permissions_unix::test::affirm", "options::view::tests::deduce_terminal_width_set_env_bad", "output::render::size::test::device_ids", "tests/cmd/icons_all.toml", "theme::customs_test::ls_pi", "theme::lsc::ansi_test::under", "options::view::tests::deduce_time_style_relative_arg", "theme::lsc::ansi_test::bg", "theme::lsc::test::yellow", "tests/cmd/tree_unix.toml", "output::render::users::test::named", "theme::lsc::ansi_test::semis", "options::file_name::tests::deduce_show_icons_auto", "theme::customs_test::exa_da", "options::file_name::tests::deduce_quote_style_quote_spaces", "options::vars::test::set_test", "theme::lsc::ansi_test::all", "options::filter::tests::deduce_dot_filter_all_all", "output::render::permissions_unix::test::extra_specials", "theme::customs_test::exa_gx", "theme::customs_test::exa_ug", "options::filter::tests::deduce_dot_filter_almost_all", "theme::customs_test::ls_so", "output::render::users::test::overflow", "theme::customs_test::exa_overwrite", "options::filter::tests::deduce_sort_field_date", "options::dir_action::tests::deduce_recurse_options_level", "output::time::test::short_month_width_hindi", "options::filter::tests::deduce_sort_field_name_case", "options::theme::tests::deduce_definitions_colors", "output::render::permissions_unix::test::negate", "options::filter::tests::deduce_file_filter_default", "options::view::tests::deduce_color_scale_size_age_luminance_40_gradient", "theme::customs_test::exa_sn", "options::view::tests::deduce_time_style_full_iso_env", "output::render::size::test::file_binary", "fs::file::ext_test::dotfile", "theme::customs_test::ls_fi_exa_txt", "output::render::octal::test::normal_file", "theme::lsc::test::empty", "theme::customs_test::exa_multi", "theme::lsc::ansi_test::rgbbi", "options::dir_action::tests::deduce_dir_action_tree", "output::escape::test::hyperlink_start_tag_escape_spaces", "theme::customs_test::exa_txt", "fs::filter::test_ignores::empty_matches_nothing", "options::view::tests::deduce_user_format_on", "options::view::tests::deduce_time_style_relative_env", "src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::map_or (line 70)", "theme::customs_test::exa_di", "theme::lsc::ansi_test::hifg", "options::view::tests::deduce_color_scale_age_luminance_60_fixed", "options::file_name::tests::deduce_show_icons_error", "theme::customs_test::ls_fi", "theme::customs_test::ls_gn", "output::render::git::test::git_blank", "theme::customs_test::exa_gr", "options::file_name::tests::deduce_options", "output::render::groups::test::primary", "theme::customs_test::ls_exa_di", "theme::customs_test::eza_fi_exa_txt", "theme::customs_test::exa_mp", "options::view::tests::deduce_time_types_modified", "options::view::tests::deduce_time_style_custom_arg", "options::view::tests::deduce_details_options_tree_secattr", "src/fs/recursive_size.rs - fs::recursive_size::RecursiveSize::unwrap_bytes_or (line 49)", "theme::customs_test::exa_mp3", "theme::customs_test::exa_xa", "options::view::tests::deduce_time_types_created", "output::render::size::test::directory", "options::view::tests::deduce_user_format_binary", "output::render::blocks::test::file_binary", "options::config::tests::parse_default_color_from_string", "theme::customs_test::exa_lp", "output::tree::trunk_test::two_children"], "test_cmds": ["cd /testbed && mkdir -p reports && cargo test --workspace -v 2>&1 | tee reports/test-output.log"], "log_parser": "def parser(log: str) -> dict[str, str]:\n import re\n\n def strip_ansi(s: str) -> str:\n # Remove ANSI CSI/OSC/other escape sequences\n ansi = re.compile(\n r\"(?:\\x1B[@-Z\\\\-_]|\\x1B\\[[0-?]*[ -/]*[@-~]|\\x1B\\][^\\x07]*(?:\\x07|\\x1B\\\\))\"\n )\n return ansi.sub(\"\", s)\n\n def norm_status(raw: str) -> str | None:\n rl = raw.strip().lower()\n if rl in {\"ok\", \"pass\", \"passed\", \"success\"}:\n return \"pass\"\n if rl in {\"ignored\", \"skipped\", \"skip\", \"filtered out\", \"xfail\", \"xfailed\"}:\n return \"skip\"\n if rl in {\"failed\", \"fail\", \"failure\", \"error\", \"errored\"}:\n return \"fail\"\n if rl in {\"measured\", \"bench\"}:\n return \"pass\"\n return None\n\n results: dict[str, str] = {}\n pending: set[str] = set()\n\n # Rust libtest\n libtest_done = re.compile(\n r\"^\\s*test\\s+(?P<name>.+?)\\s+\\.\\.\\.\\s+(?P<status>ok|FAILED|ignored|measured|bench|filtered out)\\s*$\"\n )\n libtest_start = re.compile(r\"^\\s*test\\s+(?P<name>.+?)\\s+\\.\\.\\.\\s*$\")\n\n # trycmd (common)\n trycmd = re.compile(\n r\"^\\s*(?:Testing|Test)\\s+(?P<name>.+?)\\s+\\.\\.\\.\\s+(?P<status>ok|FAILED|ignored|skipped)\\b\"\n )\n\n # pytest\n pytest = re.compile(\n r\"^\\s*(?P<name>\\S+::\\S+)\\s+(?P<status>PASSED|FAILED|SKIPPED|XFAIL|XPASS|ERROR)\\b\"\n )\n\n # Go test\n gotest = re.compile(r\"^\\s*---\\s+(?P<status>PASS|FAIL|SKIP):\\s+(?P<name>\\S+)\\b\")\n\n # unittest\n unittest = re.compile(\n r\"^\\s*(?P<name>test\\w+\\s+\\([^)]+\\))\\s+\\.\\.\\.\\s+(?P<status>ok|FAIL|ERROR|skipped)\\b\"\n )\n\n for raw_line in log.splitlines():\n s = strip_ansi(raw_line).strip()\n if not s:\n continue\n\n m = libtest_done.match(s)\n if m:\n name = m.group(\"name\").strip()\n results[name] = norm_status(m.group(\"status\")) or \"fail\"\n pending.discard(name)\n continue\n\n m = trycmd.match(s)\n if m:\n name = m.group(\"name\").strip()\n results[name] = norm_status(m.group(\"status\")) or \"fail\"\n continue\n\n m = pytest.match(s)\n if m:\n name = m.group(\"name\").strip()\n results[name] = norm_status(m.group(\"status\")) or \"fail\"\n continue\n\n m = gotest.match(s)\n if m:\n name = m.group(\"name\").strip()\n results[name] = norm_status(m.group(\"status\")) or \"fail\"\n continue\n\n m = unittest.match(s)\n if m:\n name = m.group(\"name\").strip()\n results[name] = norm_status(m.group(\"status\")) or \"fail\"\n continue\n\n m = libtest_start.match(s)\n if m:\n name = m.group(\"name\").strip()\n if name not in results:\n pending.add(name)\n continue\n\n # Incomplete tests (seen start, no completion)\n for name in pending:\n results.setdefault(name, \"fail\")\n\n return results", "docker_image": "starryzhang/sweb.eval.x86_64.eza-community_1776_eza-1664", "context_files": null, "result": {"timing": {"setup": 1.1, "pre_test_0": 65.3, "pre_test_1": 1.2, "post_test_0": 55.6, "post_test_1": 1.1, "total": 124.5}, "context_lines": 1479, "buggy_files": ["README.md", "completions/bash/eza", "completions/fish/eza.fish", "completions/nush/eza.nu", "completions/pwsh/_eza.ps1", "completions/zsh/_eza", "man/eza.1.md", "src/options/file_name.rs", "src/options/parser.rs", "src/output/file_name.rs"]}}