Files
neovim/test/functional/editor/xxd_spec.lua
benarcher2691 5bb8734fb6 build(windows): vendor xxd.c #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
2025-11-29 23:15:47 -05:00

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)