fish-shell/build_tools
ridiculousfish 15c0313c33 Fix pexpect_helper.py prompt regex
The prompt regex for pexpect was:

```
    return re.compile(
        r"""(?:\r\n?|^)   # beginning of line
            (?:\x1b[\d[KB(m]*)* # optional colors
            (?:\x1b[\?2004h) # Bracketed paste
            (?:\x1b[>4;1m) # XTerm's modifyOtherKeys
            (?:\x1b[>5u) # CSI u with kitty progressive enhancement
            (?:\x1b=) # set application keypad mode, so the keypad keys send unique codes
            (?:\[.\]\ )?  # optional vi mode prompt
         """
        + (r"prompt\ %d>" % counter)  # prompt with counter
        + r"""
            (?:\x1b[\d\[KB(m]*)* # optional colors
        """,
        re.VERBOSE,
    )
```

This has a terrible bug: an accidentally unescaped bracket here:

    (?:\x1b[>4;1m) # XTerm's modifyOtherKeys
           ^

This bracket then extends throughout the entire regex, and is
accidentally terminated here:

    (?:\x1b[\d\[KB(m]*)* # optional colors
                    ^

Thus the whole regex is busted; in particular the prompt counters are
not being tested correctly.

A second issue is that these escape sequences are not emitted before the
first prompt, so correcting the regex will cause every test to fail.

Fix this by ignoring all of the escape sequences and merely look for
the "prompt %d>" portion.

THIS DELIBERATELY CAUSES TEST FAILURES.

The tests were already broken and falsely reported as passing.
These will be fixed in followup commits.

Good news is that the tests should become way more reliable after
this is fixed - hopefully no more introducing random sleep() calls.
2024-06-02 14:07:35 -07:00
..
osx_package_resources welcome.html: Provide fallback font-families as we are unsure 2022-01-28 19:47:58 -08:00
osx_package_scripts Add missing newlines 2022-01-26 13:51:45 -08:00
diff_profiles.fish Use set -l to force use of a local variable 2020-05-15 08:25:07 +02:00
extract_help_sections.fish Add script to extract help sections 2021-08-23 18:01:31 +02:00
fish_xgettext.fish translations: Remove tmpdir from location 2024-03-10 16:40:58 +01:00
git_version_gen.sh Skip building version file if git describe fails the new perm check 2022-05-26 09:35:59 +02:00
list_committers_since.fish build_tools/list_committers_since: account for possibility of mktemp 2020-11-14 15:57:42 +01:00
littlecheck.py Update littlecheck to 3d8a08bd164a96f53aef2a00a818e8778808e95a 2022-12-23 18:49:41 +01:00
lsan_suppressions.txt Remove remaining mentions of curses 2024-02-23 16:36:10 +01:00
mac_notarize.sh macOS notarization: migrate from altool to notarytool 2022-12-26 15:25:42 -08:00
make_pkg.sh Use -DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" 2023-12-07 22:12:40 -08:00
make_tarball.sh Remove trace of corrosion 2024-03-23 11:52:49 +01:00
make_vendor_tarball.sh build tools: add make_vendor_tarball script 2024-04-30 23:36:56 +08:00
osx_distribution.xml Fix welcome text, don't use logger. 2022-01-22 20:06:37 -08:00
pexpect_helper.py Fix pexpect_helper.py prompt regex 2024-06-02 14:07:35 -07:00
style.fish Remove C++ style/lint cruft 2024-01-07 15:12:21 +01:00