-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve vttest #1671
Improve vttest #1671
Conversation
1. Report terminal as VT220 with sixel rather than VT400 family with sixel. This fixes a hang when launching vttest as it is waiting for a response to DECRQSS. 2. Test 6.2: Support NewLine mode (CR --> CRLF). 3. Test 6.3: Fix DSR cursor position report to honor scrolling region. 4. Test 6.7: Parse and respond to DECREQTPARM (Request Terminal Parameters - CSI x). This is a VT100 sequence that xterm used to respond to always, but more recently only responds to when explicitly set to VT100 level.
Hey, can't really say much on the changes here (other than it's great to get such competent help!), but the test is failing because a insta snapshot has changed. |
Hey @AutumnMeowMeow - I'm happy to see your work on this! All the changes seem great to me. In addition to @tlinford 's comment about the tests, I also saw clippy is failing. In case you don't know it, it's essentially a bunch of extra lint rules. You can see its output in the CI, but in case you want to run it locally, you can do so with Otherwise, would you be comfortable adding some unit tests for this change? I think some good places would be here and/or here. Do note that this is unfortunately a very under-tested part of the code-base, so it's definitely no biggie if we leave things as is. |
@imsnif Thank you for the pointer on clippy. Obviously I'm still newish to Rust and just barely aware of zellij's internal design, so will have to graciously thank someone else if unit tests magically appear. :) For completeness, here are the remaining vttest gaps at the VT102 level for zellij:
See also wez/wezterm#904 and wez/wezterm#133 (comment) for more in-depth discussion. My vote would be:
Thoughts? |
Hey @AutumnMeowMeow - this looks great. I totally understand about the tests, I guess with these sorts of features it also won't be super trivial to make a proper test. Everything you did is comprehensible to me, so I'm happy to merge this as is and add tests when I go over this section and add test for the rest of the uncovered parts.
👍
Sounds great.
I very much agree. I think it's great to be as compatible as possible, but with rarely used features that hardly affect our users (and would take a lot of effort to implement) I'm happy to settle. We can look into this again if we have a specific request or run into a specific issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your work on this! I hope to see more contributions from you.
* Improve 'vttest' scenarios: 1. Report terminal as VT220 with sixel rather than VT400 family with sixel. This fixes a hang when launching vttest as it is waiting for a response to DECRQSS. 2. Test 6.2: Support NewLine mode (CR --> CRLF). 3. Test 6.3: Fix DSR cursor position report to honor scrolling region. 4. Test 6.7: Parse and respond to DECREQTPARM (Request Terminal Parameters - CSI x). This is a VT100 sequence that xterm used to respond to always, but more recently only responds to when explicitly set to VT100 level. * cargo fmt * Fix failing unit test snapshot * fix clippy error * VT100 UK character set
This is for #1650 , plus a bit more, and rounds out the "'terminal reports" tests:
Test 6.4: Report terminal Primary Device Attributes as VT220 with sixel rather than VT400 family with sixel. This fixes a hang when launching vttest as it is waiting for a response to DECRQSS.
Test 6.2: Support NewLine mode (CR --> CRLF).
Test 6.3: Fix DSR cursor position report to honor scrolling region.
Test 6.7: Parse and respond to DECREQTPARM (Request Terminal Parameters - CSI x). This is a VT100 sequence that xterm used to respond to always, but more recently only responds to when explicitly set to VT100 level.
Note that this is AFAIK my first PR for zellij, so may have missed some things and/or have non-optimal/non-idiomatic Rust. Happy to update as per suggestions.
I have run fmt and tests. Tests are failing:
I believe this is due to the DA response being different. How can I update the test?