mirror of
https://github.com/neovim/neovim.git
synced 2025-12-20 13:25:34 +00:00
backport: build(windows): vendor xxd.c (#36755)
backport https://github.com/neovim/neovim/pull/36746 Problem: Currently we fetch a prebuilt xxd.exe from neovim/deps for Windows, which is not ideal in terms of obviousness, misses updates, and is clumsy to update. Solution: Similar to tee.c (#36363), vendor xxd.c from Vim and build it as part of the Neovim build process. This makes the source obvious, enables analyzer checks, and simplifies updates. Fixes #36664 Co-authored-by: benarcher2691 <ben.archer2691@gmail.com>
This commit is contained in:
19
test/functional/editor/xxd_spec.lua
Normal file
19
test/functional/editor/xxd_spec.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local t = require('test.testutil')
|
||||
local n = require('test.functional.testnvim')()
|
||||
|
||||
local eq = t.eq
|
||||
local clear = n.clear
|
||||
local fn = n.fn
|
||||
local testprg = n.testprg
|
||||
|
||||
describe('xxd', function()
|
||||
before_each(clear)
|
||||
|
||||
it('works', function()
|
||||
-- Round-trip test: encode then decode should return original
|
||||
local input = 'hello'
|
||||
local encoded = fn.system({ testprg('xxd') }, input)
|
||||
local decoded = fn.system({ testprg('xxd'), '-r' }, encoded)
|
||||
eq(input, decoded)
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user