Changing the test because curses in the DUMB term seems unable to start on new
lines at certain places *and* seems to truncate at 80 columns. Anyway, the gist
is, we were testing for a string that is beyond column 80 and hence is
truncated. Instead we now test for something that's at the beginning of a line.

Closes #15095.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Zhiming Wang 2017-06-29 04:46:25 -04:00 committed by ilovezfs
parent d825811ec9
commit 3edb2a5e1e

View file

@ -1,8 +1,8 @@
class Nnn < Formula class Nnn < Formula
desc "Free, fast, friendly file browser" desc "Free, fast, friendly file browser"
homepage "https://github.com/jarun/nnn" homepage "https://github.com/jarun/nnn"
url "https://github.com/jarun/nnn/archive/v1.1.tar.gz" url "https://github.com/jarun/nnn/archive/v1.2.tar.gz"
sha256 "15ce2a205147b8dd9da5de1ffa6e4b273ac8385959740786f7342057d0209cc3" sha256 "d8b1f04ef99324a16504d14999833fe97da7840e058e37538fb350cd39e38022"
bottle do bottle do
cellar :any_skip_relocation cellar :any_skip_relocation
@ -16,12 +16,11 @@ class Nnn < Formula
end end
test do test do
touch "foobar"
# Testing this curses app requires a pty # Testing this curses app requires a pty
require "pty" require "pty"
PTY.spawn(bin/"nnn") do |r, w, _pid| PTY.spawn(bin/"nnn") do |r, w, _pid|
w.write "q" w.write "q"
assert_match "foobar", r.read assert_match "cwd: #{testpath.realpath}", r.read
end end
end end
end end