Skip to content
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

Use stty when available to set tty width for tests #296

Closed
wants to merge 1 commit into from

Commits on Nov 25, 2019

  1. Use stty when available to set tty width for tests

    Checks for `stty` in path and uses it, if available, to set terminal
    width (`stty columns 149`). This guarantees that the desired terminal
    width is used for tests when the value comes from `ioctl`, since [that
    has priority over the `COLUMNS` env
    var](https://github.com/go-jira/jira/blob/590244947b92c5cfef5dc61b4e1aa931f8da5762/jiracli/templates.go#L101).
    
    This addresses an issue where tests for the output of templates that
    use the `termWidth` template function would fail when run in certain
    environments - in my case, `bash` running in `rxvt-unicode-256color`
    in Fedora 30 - when the terminal width doesn't match `149` like the
    test expects.
    dobbymoodge committed Nov 25, 2019
    Configuration menu
    Copy the full SHA
    1f6e93b View commit details
    Browse the repository at this point in the history