Commit Graph

93 Commits

Author SHA1 Message Date
John Hood cbca234b38 Add a separate test for BCE
This test is properly gated on tmux 2.4.
2017-11-08 19:50:35 -05:00
John Hood 968d56f885 Revert "Extend true color test to include background color erase."
This reverts commit aa96fc867f.

tmux doesn't support BCE until 2.4, so this change fails on 2.3.
2017-11-07 23:14:42 -05:00
John Hood aa96fc867f Extend true color test to include background color erase. 2017-11-06 18:38:54 -05:00
John Hood 0ec85b508e Check tmux version for truecolor test. 2017-11-04 14:37:11 -04:00
Kang.Jianbin 96b5027d9e Add emulation-attributes test for true color. 2017-10-29 20:20:03 -04:00
John Hood 6f9de49c27 Safeguard tmux sanity check. 2017-08-11 12:59:39 -04:00
John Hood a40b67691a Remove various assert(constant) calls
These cause warnings from static checkers, and seem to lead to spurious
GCC7 -Wmaybe-uninitialized.
2017-08-06 23:12:05 -04:00
John Hood 8f68400c13 Convert new/delete to shared_ptr. 2017-08-02 22:07:02 -04:00
John Hood 33afb3abc1 Remove redundant new/delete 2017-08-02 22:07:02 -04:00
John Hood 7c68667bc0 Explicitly set tmux window size in tests.
Recent versions of tmux master gave us an 80x23 window.  tmux has been
fixed to default to 80x24, and also to allow setting window sizes in
control mode.  These flags fortunately do not conflict with older
versions tmux.  So we use them to avoid problems going forward.
2017-05-28 21:19:03 -04:00
John Hood 73fc71376a Add a pause mechanism for debugging tests. 2017-05-28 19:28:04 -04:00
John Hood d15d342df3 Tests: symlink to tmux sockets
This makes it easier to attach a second client to inspect a test.
2017-05-28 19:27:39 -04:00
John Hood 2f89ac0ac7 Make tmux version check work with tmux master. 2017-05-28 13:19:12 -04:00
John Hood 9f54cc76d2 Detect broken tmux in tests
This works around Debian kfreebsd build failures.
2017-05-21 12:49:18 -04:00
John Hood a6d580a7c5 Set locale more correctly in tests
This fixes Debian builds which only have LC_ALL=POSIX set.
2017-05-18 23:22:55 -04:00
John Hood 2fe33ff009 Disable unicode-later-combining.test for tmux 2.4. 2017-05-07 20:51:31 -04:00
John Hood 23ec4e59cb Revert "Disable unicode-later-combining.test for now"
This reverts commit df4dbe0d6c.
2017-05-07 20:28:14 -04:00
John Hood d205a98a87 Test for SCROLL UP and SCROLL DOWN. 2017-05-06 11:23:56 -04:00
John Hood df4dbe0d6c Disable unicode-later-combining.test for now
tmux 2.4+ has serious bugs with combining characters.
2017-04-26 01:25:59 -04:00
Adrien Destugues aa74af9a34 Fix build on Haiku.
- Look for socket in libnetwork
- Look for forkpty in libbsd
2017-04-24 22:40:31 -04:00
John Hood 3b1984f9f8 Make tests work with OpenBSD's unversioned tmux
This tests for OpenBSD 6.x or later.  We could likely extend the
test to much older OpenBSD versions, but not without OS installs
and testing.
2017-04-24 22:40:30 -04:00
John Hood 654f269917 Make tests detect UTF-8 locale with a helper executable
This uses the same utility function that mosh-client/mosh-server do.
This resolves portability issues with the 'locale' command.
This fixes OpenBSD 6.0 and probably Haiku builds.
2017-04-24 22:38:47 -04:00
John Hood 0fc950bd8a Ensure a UTF-8 locale is available for tests
Fixes Debian sid schroot build.

Also add build deps required for full testing:
tmux,  less (for window-resize.test)
2017-03-01 23:16:26 -05:00
John Hood 2e816205f7 window-resize.test: use a known-present file
/etc/services may not be present in a Debian sid schroot.
Also make $srcdir available to test scripts.
2017-03-01 23:16:26 -05:00
John Hood 1cad191b10 emulation-attributes.test: fix vt100 test failure
The failure only occurs in a Debian Sid schroot environment.
2017-03-01 23:16:26 -05:00
John Hood 936ee83d29 emulation-attributes.test: fix indentation 2017-03-01 23:16:26 -05:00
Keith Winstein da206f621c src/tests/.gitignore: add inpty 2017-02-06 23:32:32 -08:00
John Hood 278fd12ec1 More print-to-pipe error checking in tests. 2016-11-29 22:31:33 -05:00
John Hood 60c5b022f8 Check for assertion failures while testing. 2016-11-29 22:30:25 -05:00
Anders Kaseorg 4fe706a4d3 src/test/local.test: Set TERM=xterm
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-19 18:31:29 -05:00
Anders Kaseorg f0f83f5c4e src/tests/inpty.cc: Send the inner stderr to the outer stderr
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-19 18:31:29 -05:00
Anders Kaseorg f7f741dab4 src/tests/inpty.cc: Skip the test on forkpty failures
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-13 16:13:25 -05:00
john hood 74469a7592 inpty.cc: Align configuration to be like mosh-server.cc.
This fixes a FreeBSD 11.0 build failure.
2016-11-12 23:25:56 -05:00
Anders Kaseorg 43251ea8db Add a trivial test that the mosh script works without needing tmux
None of the previous tests even ran the mosh script unless tmux ≥ 1.8 is
installed.  Thus ‘make check’ was “passing” on, e.g., RHEL 6 even though
its Perl is too old (5.10.1).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-12 23:25:35 -05:00
John Hood c9d0c9c0c5 tests/prediction-unicode.test: env -u is not POSIX
Seen to fail on OpenBSD 5.2.
2016-11-12 15:33:07 -05:00
John Hood 52d10cf211 Add a test for spinning on no-change screen updates 2016-11-06 06:15:42 -05:00
John Hood dc292dcdaa Test for spinning Mosh 2016-11-06 06:15:42 -05:00
John Hood 9ffbeddbc8 Put spin debug under -vv flag, and add to mosh-client 2016-11-06 06:15:41 -05:00
John Hood 444eae1fc4 Add tests to run Mosh repeatedly. 2016-11-06 06:15:41 -05:00
John Hood 4bc9e5c6ab Handle printing to closed pipes better in tests.
Some systems do not deliver SIGPIPE to shell pipeline writers when the
downstream reader has exited.  So, also check for errors from
/bin/printf.  I fixed this for OpenBSD 6.0 but I think it will also
fix posh on Linux.
2016-11-06 06:09:49 -05:00
Anders Kaseorg b76d1bd526 e2e-test: Add newline to “unknown test type argument” error
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
Anders Kaseorg 8a8f2b29ca Fix most shell hygiene issues found by shellcheck
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
Jakub Wilk 42d686882f Fix typos 2016-10-09 16:04:42 +02:00
John Hood 477729b315 tests: improve robustness
Replace some blind timeouts with actual synchronization.
Improve performance on some slow tests.
Tweak some of the remaining timeouts.

This still isn't good enough to get 'make -j9 check'
working reliably on Cygwin for me; I think some Cygwin/
Windows scheduling issues remain.
2016-09-20 06:25:43 -04:00
John Hood e734d5e41a tests: Work around tmux display corruption bug on OpenBSD.
See https://github.com/tmux/tmux/issues/539
2016-09-19 13:23:16 -04:00
John Hood 5619dd47bb tests: fix incorrect usage of "trap ... SIGHUP"
Discovered with OpenBSD 6.0 /bin/sh
2016-09-19 13:23:16 -04:00
Keith Winstein da7c87a822 Add test for nonce incrementing 2016-08-10 04:49:52 -07:00
John Hood 8211b88420 Don't use user's .tmux.conf
It may contain configuration that breaks our testing.
2016-07-21 01:19:23 -04:00
John Hood e89c4fcb65 update .gitignores 2016-05-24 18:43:51 -04:00
John Hood c027112a88 Coverity fixes: uncaught exceptions 2016-05-10 23:55:56 -04:00