Sha256: e85e99a5aef62b0cef5a9818e411b124283fa6eb992d3337bafa50208d719a4a
Contents?: true
Size: 732 Bytes
Versions: 62
Compression:
Stored size: 732 Bytes
Contents
local rle = require('run-length-encoding') describe('run-length-encoding', function() it('should encode simple strings', function() assert.equal('2A3B4C', rle.encode('AABBBCCCC')) end) it('should decode simple strings', function() assert.equal('AABBBCCCC', rle.decode('2A3B4C')) end) it('should not encode characters with a run length of 1', function() assert.equal('2AB4CD', rle.encode('AABCCCCD')) end) it('should successfully decode characters with a run length of 1', function() assert.equal('AABCCCCD', rle.decode('2AB4CD')) end) it('should decode an encoded string back to the original string', function() assert.equal('zzz ZZ zZ', rle.decode(rle.encode('zzz ZZ zZ'))) end) end)
Version data entries
62 entries across 62 versions & 1 rubygems