diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-30 07:46:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 07:46:24 +0200 |
commit | 7d5388735239ebda0359bfd3947d767ca38a2a82 (patch) | |
tree | a15e49bf79c7652a977abe19783a8d9e5c0bddb9 /test | |
parent | 56e570f8af263aeefe2b6dc121c4a88c347a6e9c (diff) | |
parent | bf85023005f01657b78d5279e7c4843781254e46 (diff) | |
download | rneovim-7d5388735239ebda0359bfd3947d767ca38a2a82.tar.gz rneovim-7d5388735239ebda0359bfd3947d767ca38a2a82.tar.bz2 rneovim-7d5388735239ebda0359bfd3947d767ca38a2a82.zip |
Merge pull request #10855 from blueyed/out_data_decide_throttle
Revisit out_data_decide_throttle
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/fixtures/shell-test.c | 17 | ||||
-rw-r--r-- | test/functional/ui/output_spec.lua | 2 |
2 files changed, 6 insertions, 13 deletions
diff --git a/test/functional/fixtures/shell-test.c b/test/functional/fixtures/shell-test.c index 550e5dd997..a221a31bde 100644 --- a/test/functional/fixtures/shell-test.c +++ b/test/functional/fixtures/shell-test.c @@ -40,7 +40,6 @@ static void help(void) puts(" 0: foo bar"); puts(" ..."); puts(" 96: foo bar"); - puts(" shell-test REP_NODELAY N {text}"); puts(" shell-test INTERACT"); puts(" Prints \"interact $ \" to stderr, and waits for \"exit\" input."); } @@ -67,8 +66,7 @@ int main(int argc, char **argv) if (argc >= 3) { fprintf(stderr, "%s\n", argv[2]); } - } else if (strcmp(argv[1], "REP") == 0 || - strcmp(argv[1], "REP_NODELAY") == 0) { + } else if (strcmp(argv[1], "REP") == 0) { if (argc != 4) { fprintf(stderr, "REP expects exactly 3 arguments\n"); return 4; @@ -78,15 +76,10 @@ int main(int argc, char **argv) fprintf(stderr, "Invalid count: %s\n", argv[2]); return 4; } - if (strcmp(argv[1], "REP_NODELAY") == 0) { - for (int i = 0; i < count; i++) { - printf("%d: %s\n", i, argv[3]); - fflush(stdout); - } - } else { - for (int i = 0; i < count; i++) { - printf("%d: %s\n", i, argv[3]); - fflush(stdout); + for (int i = 0; i < count; i++) { + printf("%d: %s\n", i, argv[3]); + fflush(stdout); + if (i % 100 == 0) { usleep(1000); // Wait 1 ms (simulate typical output). } } diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index 4a0e7ccad0..139ef5964e 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -50,7 +50,7 @@ describe("shell command :!", function() end) it("throttles shell-command output greater than ~10KB", function() - child_session.feed_data(":!"..nvim_dir.."/shell-test REP_NODELAY 30001 foo\n") + child_session.feed_data(":!"..nvim_dir.."/shell-test REP 30001 foo\n") -- If we observe any line starting with a dot, then throttling occurred. -- Avoid false failure on slow systems. |