Benjamin Barenblat
3acaa1c4d3
clang-format Mosh
...
Run clang-format over the Mosh source tree. This is a large change and
has been factored into its own commit for auditability. Reproduce it
with
find . -name \*.cc -or -name \*.h | while read f; do clang-format -i --style=file $f; done
2023-08-07 22:03:00 -04:00
Alex Chernyakhovsky
cf542739cc
Switch to C++ versions of standard C headers
2023-07-30 19:02:51 -04:00
Alex Chernyakhovsky
38c84a9330
Removed shared_ptr shim
...
Since C++17 is now the default mosh version, remove the shared_ptr
shim in favor of std::shared_ptr.
2023-07-30 19:02:51 -04:00
Alex Chernyakhovsky
325098ac07
Switch to fully-qualified #include
...
Previously, mosh used extensive -I flags and all of the mosh-local
makes it really hard to tell what the proper dependency graph is, so
instead remove the -I arguments in favvor of $(top_srcdir) and qualify
the paths wherever they are used.
2023-07-30 17:03:40 -04:00
Alex Chernyakhovsky
68226283cb
Disable emulation-attributes-bce on tmux 3.3a
...
tmux 3.3a has a behavior change, since reverted, that is incompatible
with this test. Unfortunately, tmux 3.3a has already made it into some
distributions, so the test has to be disabled when tmux 3.3a is encountered.
2022-10-26 19:15:04 -04:00
Benjamin Barenblat
cd7050613c
Audit and fix up format strings
2022-08-03 19:59:56 -04:00
Alex Chernyakhovsky
2b7dd9efc3
Correct memory leak in ocb-aes test
2022-07-05 15:36:13 -04:00
Alex Chernyakhovsky
70a02d1e83
Add support for generating coverage reports
...
This change adds autoconf/automake support for building all of mosh
with gcov, and generates an lcov html report. This allows seeing which
parts ofthe source tree have good test coverage, and which can be
shored up. Eventually, it would be good to hook this up to Github
Actions to be generated automatically.
2022-05-30 19:38:10 -04:00
John Hood
71829ff631
unicode-later-combining.test: Document slightly.
2018-08-29 22:44:04 -04:00
John Hood
5cdbad68b8
Ignore select() errors on Travis/MacOS.
2018-08-03 15:16:55 -04:00
John Hood
7cd4312dae
Construct socket name correctly for tmux_check()
...
In moving this function from e2e-test, I forgot that it depends on a
variable set there.
2017-11-08 19:50:35 -05:00
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