mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 04:17:01 +00:00 
			
		
		
		
	test: Windows not detected in msys shells #22671
Problem:
The functional tests have `is_os(s)` to determine if the current os is.
E.g. `is_os("win")` returns true if the current os is Windows. This is
done by checking if the sysname as detected by luv contains the
substring 'windows'.  In MSYS shells, the sysname is looks like
MINGWXX_NT, where XX is either 32 or 64.  So if you're using busted or
luv that you built separately, not the nvim-bundled versions, then
`is_os(s)` won't work.
Solution:
Treat sysname containing "mingw" as Windows.
			
			
This commit is contained in:
		| @@ -312,7 +312,7 @@ function module.is_os(s) | ||||
|     or s == 'bsd') then | ||||
|     error('unknown platform: '..tostring(s)) | ||||
|   end | ||||
|   return not not ((s == 'win' and module.sysname():find('windows')) | ||||
|   return not not ((s == 'win' and (module.sysname():find('windows') or module.sysname():find('mingw'))) | ||||
|     or (s == 'mac' and module.sysname() == 'darwin') | ||||
|     or (s == 'freebsd' and module.sysname() == 'freebsd') | ||||
|     or (s == 'openbsd' and module.sysname() == 'openbsd') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Enan Ajmain
					Enan Ajmain