mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
15c0313c33
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. |
||
---|---|---|
.. | ||
osx_package_resources | ||
osx_package_scripts | ||
diff_profiles.fish | ||
extract_help_sections.fish | ||
fish_xgettext.fish | ||
git_version_gen.sh | ||
list_committers_since.fish | ||
littlecheck.py | ||
lsan_suppressions.txt | ||
mac_notarize.sh | ||
make_pkg.sh | ||
make_tarball.sh | ||
make_vendor_tarball.sh | ||
osx_distribution.xml | ||
pexpect_helper.py | ||
style.fish |