mirror of
https://github.com/neovim/neovim.git
synced 2025-12-25 15:48:55 +00:00
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
20 lines
488 B
Lua
20 lines
488 B
Lua
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)
|