summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/editor/xxd_spec.lua
blob: a42b93f80118be84ef7b876f808048dc6c8a7ed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()
    t.skip(t.is_arch('s390x'), 'FIXME: xxd not built correctly on s390x with QEMU?')
    -- 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)