Revision b8cc390e filter/test.conf

View differences:

filter/test.conf
1

  
1 2
/*
2 3
 *	This is an example configuration file.
3 4
 *	FIXME: add all examples from docs here.
......
36 37
	i = arg2;
37 38

  
38 39
	case arg1 {
39
	one: printn "jedna, "; printn "jedna";
40
	11, 1, 111: printn "jedna, "; printn "jedna";
40 41
	(one+onef(2)): printn "dva, "; printn "jeste jednou dva";
41 42
	(2+one) .. 5: if arg2 < 3 then printn "tri az pet";
42 43
	else: printn "neco jineho";
......
236 237

  
237 238
	ps = [(1,(one+one)), (3,4)..(4,8), (5,*), (6,3..6)];
238 239
	print "Pair set: ", ps;
239
	print "Testing pair set, true:  ", pp ~ ps,  "  ", (3,5) ~ ps, "  ", (4,1) ~ ps, "  ", (5,4) ~ ps, "  ", (5,65535) ~ ps, "  ", (6,4) ~ ps;
240
	print "Testing pair set, false: ", (3,3) ~ ps, " ", (4,9) ~ ps, " ", (4,65535) ~ ps, " ", (6,2) ~ ps, " ", (6,(6+one)) ~ ps, " ", ((one+6),2) ~ ps ;
240
	print "Testing pair set, true:  ", pp ~ ps,  "  ", (3,5) ~ ps, "  ", (4,1) ~ ps, "  ", (5,4) ~ ps, "  ", (5,65535) ~ ps, "  ", (6,4) ~ ps, "  ", (3, 10000) ~ ps;
241
	print "Testing pair set, false: ", (3,3) ~ ps, " ", (4,9) ~ ps, " ", (4,65535) ~ ps, " ", (6,2) ~ ps, " ", (6,6+one) ~ ps, " ", ((one+6),2) ~ ps, " ", (1,1) ~ ps;
242

  
243
	ps = [(20..150, 200..300), (50100..50200, 1000..50000), (*, 5+5)];
244
	print "Pair set: .. too long ..";
245
	print "Testing pair set, true:  ", (100,200) ~ ps,  "  ", (150,300) ~ ps, "  ", (50180,1200) ~ ps, "  ", (50110,49000) ~ ps, "  ", (0,10) ~ ps, "  ", (64000,10) ~ ps;
246
	print "Testing pair set, false: ", (20,199) ~ ps, " ", (151,250) ~ ps, " ", (50050,2000) ~ ps, " ", (50150,50050) ~ ps, " ", (10,9) ~ ps, " ", (65535,11) ~ ps ;
241 247

  
242 248
	qq = 1.2.3.4;
243 249
	print "Testinq quad: 1.2.3.4 = ", qq,

Also available in: Unified diff