File: test-metavalue.lua

package info (click to toggle)
haskell-pandoc-lua-marshal 0.3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 384 kB
  • sloc: haskell: 2,811; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local tasty = require 'tasty'

local test = tasty.test_case
local group = tasty.test_group
local assert = tasty.assert

return {
  group 'MetaValue elements' {
    test('MetaList elements behave like lists', function ()
      local metalist = MetaList{}
      assert.are_equal(type(metalist.insert), 'function')
      assert.are_equal(type(metalist.remove), 'function')
    end),
    test('Numbers are treated as strings', function ()
      local metalist = MetaList{5, 23, 13.37}
      assert.are_same(metalist, MetaList{'5', '23', '13.37'})
    end)
  }
}