File: test-compare-no-order.lua

package info (click to toggle)
lua-penlight 1.0.2%2Bhtmldoc-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,860 kB
  • sloc: makefile: 7
file content (13 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- test-compare-no-order.lua

local T = require 'pl.tablex'
local P = require 'pl.permute'

local t = {10,20,5,5,10,'one',555}

local permutations = P.table(t)
print('permutations',#permutations)
for _,p in ipairs(permutations) do
	if not T.compare_no_order(t,p) then return print 'different!' end
end
print 'DONE'