Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow specifying terminal size

Aperta
#119 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Inizia dal contesto di follow-up in #17 e analizza come rexpect avvia i processi e configura il terminale esposto tramite /dev/tty. Considera il comportamento di crossterm con dimensione zero descritto nell’issue e definisci come i chiamanti specificano la dimensione del terminale del processo avviato. Il lavoro è completato quando i test di integrazione possono impostare una dimensione diversa da zero e ispezionare l’output a schermo intero risultante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi, this is a follow-up for #17. Basically I would like to be able to set the terminal size for the spawned process.

My use case is as follows: I'm using rexpect to create integration tests for my full-screen TUI app (like vim), where I launch the program, send some keystrokes to it, and check that the printed characters are as expected. The layout of my app will depend on the terminal size, and for example some elements are not drawn at all if the size is zero. Currently I can't test my app properly without setting the terminal size.

Currently, my program actually crashes with a zero-size terminal, which I should probably handle, but I am still unable to test the screen contents.

(As another sidenote, this issue didn't come up before because crossterm (the library I'm using for the TUI) used to check if the size from /dev/tty (set by rexpect) is zero, and if it was, it used tput to query the terminal size instead. However, after an update, this check was removed and it returns a zero-size terminal now, which breaks my tests.)

Lingua principale
Rust
Stelle
391
Fork
69
Merge medio
1g 34m
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-cli/rexpect

Tutte le issue di rust-cli/rexpect

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.