mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	test/channels_spec: cleanup
- Remove stray print()
- Use uname() instead of system('uname')
			
			
This commit is contained in:
		| @@ -1,3 +1,5 @@ | |||||||
|  | local global_helpers = require('test.helpers') | ||||||
|  | local uname = global_helpers.uname | ||||||
|  |  | ||||||
| local helpers = require('test.functional.helpers')(after_each) | local helpers = require('test.functional.helpers')(after_each) | ||||||
| local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq, | local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq, | ||||||
| @@ -7,6 +9,7 @@ local sleep = helpers.sleep | |||||||
| local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv | local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv | ||||||
| local set_session = helpers.set_session | local set_session = helpers.set_session | ||||||
| local nvim_prog = helpers.nvim_prog | local nvim_prog = helpers.nvim_prog | ||||||
|  | local os_name = helpers.os_name | ||||||
| local retry = helpers.retry | local retry = helpers.retry | ||||||
| local expect_twostreams = helpers.expect_twostreams | local expect_twostreams = helpers.expect_twostreams | ||||||
|  |  | ||||||
| @@ -138,9 +141,8 @@ describe('channels', function() | |||||||
|  |  | ||||||
|     command("call chansend(id, 'incomplet\004')") |     command("call chansend(id, 'incomplet\004')") | ||||||
|  |  | ||||||
|     local is_freebsd = eval("system('uname') =~? 'FreeBSD'") == 1 |     local is_freebsd = (string.lower(uname()) == 'freebsd') | ||||||
|     local bsdlike = is_freebsd or (helpers.os_name() == "osx") |     local bsdlike = is_freebsd or (os_name() == "osx") | ||||||
|     print("bsdlike:", bsdlike) |  | ||||||
|     local extra = bsdlike and "^D\008\008" or "" |     local extra = bsdlike and "^D\008\008" or "" | ||||||
|     expect_twoline(id, "stdout", |     expect_twoline(id, "stdout", | ||||||
|                    "incomplet"..extra, "[1, ['incomplet'], 'stdin']", true) |                    "incomplet"..extra, "[1, ['incomplet'], 'stdin']", true) | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ local clear, curbufmeths = helpers.clear, helpers.curbufmeths | |||||||
| local exc_exec, expect, eval = helpers.exc_exec, helpers.expect, helpers.eval | local exc_exec, expect, eval = helpers.exc_exec, helpers.expect, helpers.eval | ||||||
| local insert = helpers.insert | local insert = helpers.insert | ||||||
|  |  | ||||||
| describe('api functions', function() | describe('eval-API', function() | ||||||
|   before_each(clear) |   before_each(clear) | ||||||
|  |  | ||||||
|   it("work", function() |   it("work", function() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Justin M. Keyes
					Justin M. Keyes