on master help sign in
I think parser is working
9e7a271iko
TODO.md+3−2
@@ -4,5 +4,6 @@
4- [x] any string apart from the basic string with no escapes
4- [x] any string apart from the basic string with no escapes
5- [x] check if int fits in int or make it a float
5- [x] check if int fits in int or make it a float
6- [x] should `print-blok` have `do`-`end`? This is fucked.
6- [x] should `print-blok` have `do`-`end`? This is fucked.
7−- [ ] binary operator priority
7+- [x] binary operator priority
8−- [ ] ^ should be higher priority than unary ops
8+- [x] ^ should be higher priority than unary ops
9+- [x] Unifiy parened exprs
desk/lib/bintree.hoondeleted−8
@@ -1,8 +0,0 @@
1−|%
2−++ bintree
3− |$ [node leaf]
4− $%
5− [%node l=(bintree node leaf) n=node r=(bintree node leaf)]
6− [%leaf leaf]
7− ==
8−--
desk/lib/interlist.hoon+21−2
@@ -6,6 +6,25 @@
6 [%double =val =sep tail=(interlist sep val)]
6 [%double =val =sep tail=(interlist sep val)]
7 [%single =val]
7 [%single =val]
8 ==
8 ==
9+++ new
10+ |* [a=* b=(list [* *])]
11+ ^- (interlist _?<(?=(~ b) -.i.b) _a)
12+ ?~ b single+a
13+ double+[a -.i.b (new +.i.b t.b)]
14+++ turn-inter
15+ |* [l=(interlist) f=$-(* *)]
16+ ^- (interlist _$:f _?>(?=(%single -.l) +.l))
17+ ?- -.l
18+ %single [%single +.l]
19+ %double [%double val.l (f sep.l) $(l tail.l)]
20+ ==
21+++ turn
22+ |* [l=(interlist) f=$-(* *)]
23+ ^- (interlist _?>(?=(%double -.l) sep.l) _$:f)
24+ ?- -.l
25+ %single single+(f +.l)
26+ %double double+[(f val.l) sep.l $(l tail.l)]
27+ ==
9++ reverse
28++ reverse
10 |* l=(interlist)
29 |* l=(interlist)
11 ^+ l
30 ^+ l
@@ -39,7 +58,7 @@
39 [%double v +.tail -.tail]
58 [%double v +.tail -.tail]
40 ;~(plug v (star ;~(plug s v)))
59 ;~(plug v (star ;~(plug s v)))
41++ split-left-on
60++ split-left-on
42− |* [is-pivot=$-(* *) l=(interlist)]
61+ |* [is-pivot=$-(* ?) l=(interlist)]
43 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
62 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
44 ?- -.l
63 ?- -.l
45 %single ~
64 %single ~
@@ -50,7 +69,7 @@
50 `[[%double val.l sep.l lhs.u.rest] pivot.u.rest rhs.u.rest]
69 `[[%double val.l sep.l lhs.u.rest] pivot.u.rest rhs.u.rest]
51 ==
70 ==
52++ split-right-on
71++ split-right-on
53− |* [is-pivot=$-(* *) l=(interlist * *)]
72+ |* [is-pivot=$-(* ?) l=(interlist * *)]
54 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
73 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
55 %+ bind (split-left-on is-pivot (reverse l))
74 %+ bind (split-left-on is-pivot (reverse l))
56 |* [a=(interlist * *) b=* c=(interlist * *)] [(reverse c) b (reverse a)]
75 |* [a=(interlist * *) b=* c=(interlist * *)] [(reverse c) b (reverse a)]
desk/lib/lua/parser.hoon+124−31
@@ -1,7 +1,6 @@
1/- *lua
1/- *lua
2/+ st
2/+ st
3/+ interlist
3/+ interlist
4−/+ *bintree
5=<
4=<
6apex
5apex
7|%
6|%
@@ -54,38 +53,38 @@ apex
54 parse-funcbody
53 parse-funcbody
55 ==
54 ==
56 ::
55 ::
57− %+ cook |= [=unop =expr] [%unop unop expr]
58− ;~ plug
59− ;~ pose
60− ;~ sfix
61− ;~ pose
62− (cold %minus (just '-'))
63− (cold %sig (just '~'))
64− (cold %hax (just '#'))
65− ==
66− ws
67− ==
68− ;~ sfix
69− (cold %not (jest 'not'))
70− ;~(less parse-name ws)
71− ==
72− ==
73− %+ knee *expr |.(parse-expr)
74− ==
75 ==
56 ==
76:: Parse expressions separated by binary operators
57:: Parse expressions separated by binary operators
77::
58::
78++ parse-expr-list
59++ parse-expr-list
79− %^ tnee %parse-expr-list (interlist:interlist binop expr)
60+ %^ tnee %parse-expr-list ,(interlist:interlist binop [(list unop) expr])
80− %+ parse:interlist (ifix [ws ws] parse-binop) parse-atomic-expr
61+ %+ parse:interlist (ifix [ws ws] parse-binop)
81−:: TODO: This is mock and should take operator priority into account.
62+ ;~ plug
82−::
63+ %- star
64+ ;~ pose
65+ ;~ sfix
66+ ;~ pose
67+ (cold %minus (just '-'))
68+ (cold %sig (just '~'))
69+ (cold %hax (just '#'))
70+ ==
71+ ws
72+ ==
73+ ;~ sfix
74+ (cold %not (jest 'not'))
75+ ;~(less parse-name ws)
76+ ==
77+ ==
78+ ::
79+ parse-atomic-expr
80+ ==
83++ process-expr-list
81++ process-expr-list
84 =<
82 =<
85− |= l=(interlist:interlist binop expr)
83+ |= l=(interlist:interlist binop [(list unop) expr])
86 ^- expr
84 ^- expr
87 %- strip-tree
85 %- strip-tree
88− %- (process-left-assoc ~[%pow])
86+ %- (process-right-assoc ~[%pow])
87+ %- process-unops
89 %- (process-left-assoc ~[%mul %div %int-div %mod])
88 %- (process-left-assoc ~[%mul %div %int-div %mod])
90 %- (process-left-assoc ~[%add %sub])
89 %- (process-left-assoc ~[%add %sub])
91 %- (process-right-assoc ~[%concat])
90 %- (process-right-assoc ~[%concat])
@@ -96,19 +95,89 @@ apex
96 %- (process-left-assoc ~[%lt %gt %lteq %gteq %neq %eq])
95 %- (process-left-assoc ~[%lt %gt %lteq %gteq %neq %eq])
97 %- (process-left-assoc ~[%and])
96 %- (process-left-assoc ~[%and])
98 %- (process-left-assoc ~[%or])
97 %- (process-left-assoc ~[%or])
99− [%leaf l]
98+ (preprocess-tree l)
100 |%
99 |%
100+ +$ working-tree
101+ $%
102+ [%node l=working-tree n=binop r=working-tree]
103+ [%branch b=unop t=working-tree]
104+ [%tbd-unop l=(list [=expr =binop]) =unop r=working-tree]
105+ [%unoped l=(list [=expr =binop]) r=working-tree]
106+ [%leaf (interlist:interlist binop expr)]
107+ ==
108+ ++ preprocess-tree
109+ |= l=(interlist:interlist binop [(list unop) expr])
110+ ^- working-tree
111+ =/ splitted (find-unop l)
112+ ?~ splitted leaf+(turn:interlist l |=([* =expr] expr))
113+ tbd-unop+[l.u.splitted unop.u.splitted $(l r.u.splitted)]
114+ ++ apply-unops
115+ |= [unops=(list unop) =expr]
116+ ^+ expr
117+ ?~ unops expr
118+ [%unop i.unops $(unops t.unops)]
101 ++ strip-tree
119 ++ strip-tree
102− |= tree=(bintree binop (interlist:interlist binop expr))
120+ |= tree=working-tree
103 ^- expr
121 ^- expr
104 ?- -.tree
122 ?- -.tree
105 %leaf ?> ?=(%single +<.tree) +>.tree
123 %leaf ?> ?=(%single +<.tree) +>.tree
106 %node [%binop $(tree l.tree) n.tree $(tree r.tree)]
124 %node [%binop $(tree l.tree) n.tree $(tree r.tree)]
125+ %branch [%unop b.tree $(tree t.tree)]
126+ %tbd-unop !!
127+ %unoped ?> =(~ l.tree) $(tree r.tree)
128+ ==
129+ ++ find-unop
130+ |= l=(interlist:interlist binop [(list unop) expr])
131+ ^- (unit [l=(list [=expr =binop]) =unop r=(interlist:interlist binop [(list unop) expr])])
132+ ?- -.l
133+ %single
134+ ?~ +<.l ~
135+ %- some
136+ [~ i.-.val.l single+[t.-.val.l +.val.l]]
137+ %double
138+ ?~ -.val.l
139+ %+ ^^bind $(l tail.l)
140+ |= [k=(list [expr binop]) =unop tail=(interlist:interlist binop [(list unop) expr])]
141+ [[[+.val.l sep.l] k] unop tail]
142+ %- some
143+ [~ i.-.val.l double+[[t.-.val.l +.val.l] sep.l tail.l]]
144+ ==
145+ ++ process-unops
146+ |= tree=working-tree
147+ ^- working-tree
148+ ?- -.tree
149+ %node node+[$(tree l.tree) n.tree $(tree r.tree)]
150+ %branch branch+[b.tree $(tree t.tree)]
151+ %tbd-unop unoped+[l.tree branch+[unop.tree $(tree r.tree)]]
152+ %leaf tree
153+ %unoped unoped+[l.tree $(tree r.tree)]
107 ==
154 ==
155+ ++ split-left-unop-list
156+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
157+ ^- (unit [l=(interlist:interlist binop expr) =binop r=(list [=expr =binop])])
158+ ?~ l ~
159+ ?: (is-pivot binop.i.l) `[single+expr.i.l binop.i.l t.l]
160+ =/ rest $(l t.l)
161+ ?~ rest ~
162+ `[double+[expr.i.l binop.i.l -.u.rest] +.u.rest]
163+ ++ split-right-unop-list
164+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
165+ ^- (unit [l=(interlist:interlist binop expr) =binop r=(list [=expr =binop])])
166+ =/ reversed=(unit [l=(list [=binop =expr]) =binop r=(interlist:interlist binop expr)])
167+ =/ l=(list [=binop =expr]) (flop (turn l swap))
168+ |-
169+ ?~ l ~
170+ ?: (is-pivot binop.i.l) `[~ binop.i.l (new:interlist expr.i.l t.l)]
171+ =/ rest=(unit [l=(list [=binop =expr]) =binop r=(interlist:interlist binop expr)]) $(l t.l)
172+ ?~ rest ~
173+ `[[i.l l.u.rest] +.u.rest]
174+ ?~ reversed ~
175+ `[(reverse:interlist r.u.reversed) binop.u.reversed (turn (flop l.u.reversed) swap)]
176+ ++ swap |*([a=* b=*] [b a])
108 ++ process-right-assoc
177 ++ process-right-assoc
109 |= ops=(lest binop)
178 |= ops=(lest binop)
110− |= tree=(bintree binop (interlist:interlist binop expr))
179+ |= tree=working-tree
111− ^+ tree
180+ ^- working-tree
112 ?- -.tree
181 ?- -.tree
113 %leaf
182 %leaf
114 =/ l +.tree
183 =/ l +.tree
@@ -116,22 +185,46 @@ apex
116 =/ splitted (split-left-on:interlist |=(op=binop (elem op ops)) l)
185 =/ splitted (split-left-on:interlist |=(op=binop (elem op ops)) l)
117 ?~ splitted [%leaf l]
186 ?~ splitted [%leaf l]
118 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
187 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
188+ %branch branch+[b.tree $(tree t.tree)]
189+ %tbd-unop
190+ =/ splitted
191+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
192+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
193+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
119 %node
194 %node
120 [%node $(tree l.tree) n.tree $(tree r.tree)]
195 [%node $(tree l.tree) n.tree $(tree r.tree)]
196+ %unoped
197+ =/ splitted
198+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
199+ ?~ splitted unoped+[l.tree $(tree r.tree)]
200+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted r.tree])]
121 ==
201 ==
122 ++ process-left-assoc
202 ++ process-left-assoc
123 |= ops=(lest binop)
203 |= ops=(lest binop)
124− |= tree=(bintree binop (interlist:interlist binop expr))
204+ |= tree=working-tree
125− ^+ tree
205+ ^- working-tree
126 ?- -.tree
206 ?- -.tree
127 %leaf
207 %leaf
128 =/ l +.tree
208 =/ l +.tree
129 |-
209 |-
210+ ^- working-tree
130 =/ splitted (split-right-on:interlist |=(op=binop (elem op ops)) l)
211 =/ splitted (split-right-on:interlist |=(op=binop (elem op ops)) l)
131 ?~ splitted [%leaf l]
212 ?~ splitted [%leaf l]
132 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
213 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
214+ %tbd-unop
215+ =/ splitted
216+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
217+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
218+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
133 %node
219 %node
134 [%node $(tree l.tree) n.tree $(tree r.tree)]
220 [%node $(tree l.tree) n.tree $(tree r.tree)]
221+ %branch
222+ [%branch b.tree $(tree t.tree)]
223+ %unoped
224+ =/ splitted
225+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
226+ ?~ splitted unoped+[l.tree $(tree r.tree)]
227+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted +>.tree])]
135 ==
228 ==
136 --
229 --
137++ parse-expr
230++ parse-expr
desk/lib/lua/printer.hoon+2
@@ -40,9 +40,11 @@ print
40 %unop
40 %unop
41 %- zing
41 %- zing
42 :~
42 :~
43+ "("
43 (print-unop +<.expr)
44 (print-unop +<.expr)
44 " "
45 " "
45 (print-expr +>.expr)
46 (print-expr +>.expr)
47+ ")"
46 ==
48 ==
47 ==
49 ==
48:: unop
50:: unop
desk/res/lua/bar.luanew file+3
@@ -0,0 +1,3 @@
1+assert(010 .. 020 .. -030 == "1020-30")
2+x = - 2 ^ - 3^4
3+
desk/res/lua/cycled/all.lua+9−9
@@ -32,9 +32,9 @@ local collectgarbage = collectgarbage
32do
32do
33local msgs = {}
33local msgs = {}
34function Message(m)
34function Message(m)
35−if not _nomsg then
35+if (not _nomsg) then
36print(m)
36print(m)
37−msgs[# (msgs + 0x1)]=string.sub(m,0x3,- 0x3)
37+msgs[(# (msgs + 0x1))]=string.sub(m,0x3,(- 0x3))
38end
38end
39end
39end
40assert(os.setlocale("\u{43}"))
40assert(os.setlocale("\u{43}"))
@@ -59,7 +59,7 @@ end
59end
59end
60local Cstacklevel
60local Cstacklevel
61local showmem
61local showmem
62−if not T then
62+if (not T) then
63local max = 0x0
63local max = 0x0
64showmem=function ()
64showmem=function ()
65local m = (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400)
65local m = (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400)
@@ -115,7 +115,7 @@ dofile("\u{67}\u{65}\u{6e}\u{67}\u{63}\u{2e}\u{6c}\u{75}\u{61}")
115assert((dofile("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 0x5))
115assert((dofile("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 0x5))
116dofile("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
116dofile("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
117dofile("\u{63}\u{6f}\u{64}\u{65}\u{2e}\u{6c}\u{75}\u{61}",true)
117dofile("\u{63}\u{6f}\u{64}\u{65}\u{2e}\u{6c}\u{75}\u{61}",true)
118−if not _G._soft then
118+if (not _G._soft) then
119report("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")
119report("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")
120local f = coroutine.wrap(assert(loadfile("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")))
120local f = coroutine.wrap(assert(loadfile("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")))
121assert((f() == "\u{62}"))
121assert((f() == "\u{62}"))
@@ -139,7 +139,7 @@ assert((dofile("\u{76}\u{65}\u{72}\u{79}\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{6
139;
139;
140collectgarbage()
140collectgarbage()
141dofile("\u{66}\u{69}\u{6c}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
141dofile("\u{66}\u{69}\u{6c}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
142−if # (msgs > 0x0) then
142+if (# (msgs > 0x0)) then
143local m = table.concat(msgs,"\u{a}\u{20}\u{20}")
143local m = table.concat(msgs,"\u{a}\u{20}\u{20}")
144warn("\u{23}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{70}\u{65}\u{72}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{3a}\u{a}\u{20}\u{20}",m,"\u{a}")
144warn("\u{23}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{70}\u{65}\u{72}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{3a}\u{a}\u{20}\u{20}",m,"\u{a}")
145end
145end
@@ -163,7 +163,7 @@ end
163local _G,showmem,print,format,clock,time,difftime,assert,open,warn = _G,showmem,print,string.format,os.clock,os.time,os.difftime,assert,io.open,warn
163local _G,showmem,print,format,clock,time,difftime,assert,open,warn = _G,showmem,print,string.format,os.clock,os.time,os.difftime,assert,io.open,warn
164local fname = ((T and "\u{74}\u{69}\u{6d}\u{65}\u{2d}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{78}\u{74}") or "\u{74}\u{69}\u{6d}\u{65}\u{2e}\u{74}\u{78}\u{74}")
164local fname = ((T and "\u{74}\u{69}\u{6d}\u{65}\u{2d}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{78}\u{74}") or "\u{74}\u{69}\u{6d}\u{65}\u{2e}\u{74}\u{78}\u{74}")
165local lasttime
165local lasttime
166−if not usertests then
166+if (not usertests) then
167local f = io.open(fname)
167local f = io.open(fname)
168if f then
168if f then
169lasttime=assert(tonumber(f:read("\u{61}")))
169lasttime=assert(tonumber(f:read("\u{61}")))
@@ -176,7 +176,7 @@ end
176print("\u{63}\u{6c}\u{65}\u{61}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{6c}\u{21}\u{21}\u{21}\u{21}")
176print("\u{63}\u{6c}\u{65}\u{61}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{6c}\u{21}\u{21}\u{21}\u{21}")
177for n in pairs(_G)
177for n in pairs(_G)
178do
178do
179−if not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 0x1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 0x1})[n] then
179+if (not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 0x1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 0x1})[n]) then
180_G[n]=undef
180_G[n]=undef
181end
181end
182end
182end
@@ -191,11 +191,11 @@ showmem()
191local clocktime = (clock() - initclock)
191local clocktime = (clock() - initclock)
192walltime=difftime(time(),walltime)
192walltime=difftime(time(),walltime)
193print(format("\u{a}\u{a}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{73}\u{20}\u{28}\u{77}\u{61}\u{6c}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{73}\u{29}\u{a}",clocktime,walltime))
193print(format("\u{a}\u{a}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{73}\u{20}\u{28}\u{77}\u{61}\u{6c}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{73}\u{29}\u{a}",clocktime,walltime))
194−if not usertests then
194+if (not usertests) then
195lasttime=(lasttime or clocktime)
195lasttime=(lasttime or clocktime)
196local diff = ((clocktime - lasttime) / lasttime)
196local diff = ((clocktime - lasttime) / lasttime)
197local tolerance = 0.05
197local tolerance = 0.05
198−if ((diff >= tolerance) or (diff <= - tolerance)) then
198+if ((diff >= tolerance) or (diff <= (- tolerance))) then
199warn(format("\u{23}\u{74}\u{69}\u{6d}\u{65}\u{20}\u{64}\u{69}\u{66}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{3a}\u{20}\u{25}\u{2b}\u{2e}\u{31}\u{66}\u{25}\u{25}",(diff * 0x64)))
199warn(format("\u{23}\u{74}\u{69}\u{6d}\u{65}\u{20}\u{64}\u{69}\u{66}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{3a}\u{20}\u{25}\u{2b}\u{2e}\u{31}\u{66}\u{25}\u{25}",(diff * 0x64)))
200end
200end
201assert(open(fname,"\u{77}")):write(clocktime):close()
201assert(open(fname,"\u{77}")):write(clocktime):close()
desk/res/lua/cycled/api.lua+75−75
@@ -7,7 +7,7 @@ local pack = table.pack
7local MEMERRMSG = "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"
7local MEMERRMSG = "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"
8local function tcheck
8local function tcheck
9(t1,t2)
9(t1,t2)
10−assert((t1.n == ((t2.n or # t2) + 0x1)))
10+assert((t1.n == ((t2.n or (# t2)) + 0x1)))
11for i = 0x2, t1.n
11for i = 0x2, t1.n
12do
12do
13assert((t1[i] == t2[(i - 0x1)]))
13assert((t1[i] == t2[(i - 0x1)]))
@@ -16,7 +16,7 @@ end
16local function checkerr
16local function checkerr
17(msg,f, ...)
17(msg,f, ...)
18local stat,err = pcall(f,...)
18local stat,err = pcall(f,...)
19−assert(not (stat and string.find(err,msg)))
19+assert((not (stat and string.find(err,msg))))
20end
20end
21print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{43}\u{20}\u{41}\u{50}\u{49}")
21print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{43}\u{20}\u{41}\u{50}\u{49}")
22local a = T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
22local a = T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
@@ -24,21 +24,21 @@ assert((a == debug.getregistry()))
24assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0xa))
24assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0xa))
25assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
25assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
26assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
26assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
27−assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < - 0xa))
27+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < (- 0xa)))
28a=T.d2s(12458954321123.0)
28a=T.d2s(12458954321123.0)
29assert((a == string.pack("\u{64}",12458954321123.0)))
29assert((a == string.pack("\u{64}",12458954321123.0)))
30assert((T.s2d(a) == 12458954321123.0))
30assert((T.s2d(a) == 12458954321123.0))
31local a,b,c = T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
31local a,b,c = T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
32−assert((((a == 0x2) and (b == 0x3)) and not c))
32+assert((((a == 0x2) and (b == 0x3)) and (not c)))
33local f = T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
33local f = T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
34a,b,c=f()
34a,b,c=f()
35−assert((((a == 0x2) and (b == 0x3)) and not c))
35+assert((((a == 0x2) and (b == 0x3)) and (not c)))
36a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
36a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
37assert((((a == b) and (a == true)) and (c == false)))
37assert((((a == b) and (a == true)) and (c == false)))
38a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
38a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
39assert((((a == false) and (b == true)) and (c == false)))
39assert((((a == false) and (b == true)) and (c == false)))
40a,b,c=T.testC("\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,0x14,0x1e,0x28)
40a,b,c=T.testC("\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,0x14,0x1e,0x28)
41−assert((((a == 0x28) and (b == 0x5)) and not c))
41+assert((((a == 0x28) and (b == 0x5)) and (not c)))
42local t = pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3))
42local t = pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3))
43tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3})
43tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3})
44t=pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}",0x3,0x1,0x17))
44t=pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}",0x3,0x1,0x17))
@@ -61,7 +61,7 @@ t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{2d}\u{33}\u{20}\u{2d}\u{31}\u{3
61tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3,0x4,0x3})
61tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3,0x4,0x3})
62do
62do
63local t = {0xa,0x14,0x1e,0x28,0x32,0x3c}
63local t = {0xa,0x14,0x1e,0x28,0x32,0x3c}
64−for i = - 0x6, 0x6
64+for i = (- 0x6), 0x6
65do
65do
66local s = string.format("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{32}\u{20}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{37}",i)
66local s = string.format("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{32}\u{20}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{37}",i)
67local t1 = pack(T.testC(s,0xa,0x14,0x1e,0x28,0x32,0x3c))
67local t1 = pack(T.testC(s,0xa,0x14,0x1e,0x28,0x32,0x3c))
@@ -113,12 +113,12 @@ local a = {T.testC("\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}
113assert(((((a[0x2] == 0xe) and (a[0x3] == "\u{61}\u{33}\u{31}")) and (a[0x4] == nil)) and (_G.AA == "\u{61}\u{33}\u{31}")))
113assert(((((a[0x2] == 0xe) and (a[0x3] == "\u{61}\u{33}\u{31}")) and (a[0x4] == nil)) and (_G.AA == "\u{61}\u{33}\u{31}")))
114_G.AA,_G.BB=nil
114_G.AA,_G.BB=nil
115assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
115assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
116−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xa))
116+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
117−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xc8))
117+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
118assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
118assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
119assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
119assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
120−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xa))
120+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
121−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xc8))
121+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
122assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
122assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
123assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x2,0x0) == (10.0 / 0x0)))
123assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x2,0x0) == (10.0 / 0x0)))
124a=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
124a=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
@@ -130,7 +130,7 @@ assert(((a == 0xd) and (math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{
130a=assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
130a=assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
131assert(((a == 0xd) and (math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
131assert(((a == 0xd) and (math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
132a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
132a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
133−assert(((a == 0x1) and (b == - (0xa and (c == "\u{35}")))))
133+assert(((a == 0x1) and (b == (- (0xa and (c == "\u{35}"))))))
134local mt = {["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = function (a,b)
134local mt = {["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = function (a,b)
135return setmetatable({(a[0x1] + b[0x1])},mt)
135return setmetatable({(a[0x1] + b[0x1])},mt)
136end,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = function (a,b)
136end,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = function (a,b)
@@ -138,23 +138,23 @@ return setmetatable({(a[0x1] % b[0x1])},mt)
138end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a)
138end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a)
139return setmetatable({(a[0x1] * 0x2)},mt)
139return setmetatable({(a[0x1] * 0x2)},mt)
140end}
140end}
141−a,b,c=setmetatable({0x4},mt),setmetatable({0x8},mt),setmetatable({- 0x3},mt)
141+a,b,c=setmetatable({0x4},mt),setmetatable({0x8},mt),setmetatable({(- 0x3)},mt)
142local x,y,z = T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,a,b)
142local x,y,z = T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,a,b)
143assert((((x == 0xa) and (y[0x1] == 0xc)) and (z == nil)))
143assert((((x == 0xa) and (y[0x1] == 0xc)) and (z == nil)))
144−assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[0x1] == (0x4 % - 0x3)))
144+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[0x1] == (0x4 % (- 0x3))))
145assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[0x1] == (0x8 % (0x4 + ((- 0x3) * 0x2)))))
145assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[0x1] == (0x8 % (0x4 + ((- 0x3) * 0x2)))))
146checkerr("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}",0xa,0x0)
146checkerr("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}",0xa,0x0)
147checkerr("\u{25}\u{25}\u{30}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}",0xa,0x0)
147checkerr("\u{25}\u{25}\u{30}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}",0xa,0x0)
148assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
148assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
149assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
149assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
150−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
150+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2)))
151assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
151assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
152assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x4,0x2,0x2,0x3,0x2,0x2))
152assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x4,0x2,0x2,0x3,0x2,0x2))
153−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}"))
153+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}")))
154−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}"))
154+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}")))
155−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
155+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
156−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
156+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
157−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
157+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
158local b = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
158local b = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
159return (a[0x1] < b[0x1])
159return (a[0x1] < b[0x1])
160end}
160end}
@@ -286,13 +286,13 @@ assert((T.checkpanic("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{6
286T.totalmem((T.totalmem() + 0x2710))
286T.totalmem((T.totalmem() + 0x2710))
287assert((T.checkpanic("\u{6e}\u{65}\u{77}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{30}\u{30}\u{30}\u{30}") == MEMERRMSG))
287assert((T.checkpanic("\u{6e}\u{65}\u{77}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{30}\u{30}\u{30}\u{30}") == MEMERRMSG))
288T.totalmem(0x0)
288T.totalmem(0x0)
289−if not _soft then
289+if (not _soft) then
290local msg = T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{66}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}")
290local msg = T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{66}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}")
291assert(string.find(msg,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
291assert(string.find(msg,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
292end
292end
293assert((T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{59}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{6f}\u{27}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{68}\u{69}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}","\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{6f}\u{72}\u{69}\u{67}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}") == "\u{68}\u{69}\u{68}\u{6f}"))
293assert((T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{59}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{6f}\u{27}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{68}\u{69}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}","\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{6f}\u{72}\u{69}\u{67}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}") == "\u{68}\u{69}\u{68}\u{6f}"))
294end
294end
295−if not _soft then
295+if (not _soft) then
296print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
296print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
297collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
297collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
298checkerr("\u{58}\u{58}\u{58}\u{58}",T.testC,"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}\u{20}\u{58}\u{58}\u{58}\u{58}")
298checkerr("\u{58}\u{58}\u{58}\u{58}",T.testC,"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}\u{20}\u{58}\u{58}\u{58}\u{58}")
@@ -306,16 +306,16 @@ local lim = ((_soft and 0x1f4) or 0x2ee0)
306local prog = {("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. (((lim * 0x2) + 0x64) .. "\u{6d}\u{73}\u{67}")),"\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
306local prog = {("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. (((lim * 0x2) + 0x64) .. "\u{6d}\u{73}\u{67}")),"\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
307for i = 0x1, lim
307for i = 0x1, lim
308do
308do
309−prog[# (prog + 0x1)]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i)
309+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i)
310−prog[# (prog + 0x1)]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. (i * 0xa))
310+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. (i * 0xa))
311end
311end
312−prog[# (prog + 0x1)]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
312+prog[(# (prog + 0x1))]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
313−prog[# (prog + 0x1)]=("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. - ((0x2 * lim) + 0x2))
313+prog[(# (prog + 0x1))]=("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. (- ((0x2 * lim) + 0x2)))
314for i = 0x1, lim
314for i = 0x1, lim
315do
315do
316−prog[# (prog + 0x1)]=("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. - ((0x2 * ((lim - i) + 0x1)) + 0x1))
316+prog[(# (prog + 0x1))]=("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. (- ((0x2 * ((lim - i) + 0x1)) + 0x1)))
317end
317end
318−prog[# (prog + 0x1)]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
318+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
319prog=table.concat(prog,"\u{3b}")
319prog=table.concat(prog,"\u{3b}")
320local g,t = T.testC(prog)
320local g,t = T.testC(prog)
321assert((g == _G))
321assert((g == _G))
@@ -337,7 +337,7 @@ _G.XX=nil
337local function check3
337local function check3
338(p, ...)
338(p, ...)
339local arg = {...}
339local arg = {...}
340−assert(# (arg == 0x3))
340+assert((# (arg == 0x3)))
341assert(string.find(arg[0x3],p))
341assert(string.find(arg[0x3],p))
342end
342end
343check3("\u{3a}\u{31}\u{3a}",T.testC("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{78}\u{3d}"))
343check3("\u{3a}\u{31}\u{3a}",T.testC("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{78}\u{3d}"))
@@ -349,9 +349,9 @@ local th = coroutine.create(function ()
349
349
350end)
350end)
351local stt,err = pcall(T.testC,th,code)
351local stt,err = pcall(T.testC,th,code)
352−assert(not (stt and string.find(err,msg)))
352+assert((not (stt and string.find(err,msg))))
353end
353end
354−if not _soft then
354+if (not _soft) then
355collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
355collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
356checkerrnopro("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}","\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}")
356checkerrnopro("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}","\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}")
357print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{75}\u{6e}\u{70}\u{72}\u{6f}\u{74}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
357print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{75}\u{6e}\u{70}\u{72}\u{6f}\u{74}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
@@ -376,35 +376,35 @@ local a = {}
376a[a]=0xa
376a[a]=0xa
377local prog = "\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
377local prog = "\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
378local res = {T.testC(prog,a)}
378local res = {T.testC(prog,a)}
379−assert(# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa)))
379+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
380local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
380local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
381local res = {T.testC(prog,a,0x14)}
381local res = {T.testC(prog,a,0x14)}
382assert((a[a] == 0x14))
382assert((a[a] == 0x14))
383−assert(# ((res == 0x1) and (res[0x1] == prog)))
383+assert((# ((res == 0x1) and (res[0x1] == prog))))
384a[a]=0xa
384a[a]=0xa
385local prog = "\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
385local prog = "\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
386local res = {T.testC(prog,a)}
386local res = {T.testC(prog,a)}
387−assert(# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa)))
387+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
388local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
388local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
389local res = {T.testC(prog,a,0x14)}
389local res = {T.testC(prog,a,0x14)}
390assert((a[a] == 0x14))
390assert((a[a] == 0x14))
391−assert(# ((res == 0x1) and (res[0x1] == prog)))
391+assert((# ((res == 0x1) and (res[0x1] == prog))))
392local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
392local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
393local res = {T.testC(prog,0x1e,a)}
393local res = {T.testC(prog,0x1e,a)}
394assert((a[0x1e] == a))
394assert((a[0x1e] == a))
395−assert(# ((res == 0x1) and (res[0x1] == prog)))
395+assert((# ((res == 0x1) and (res[0x1] == prog))))
396local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
396local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
397local res = {T.testC(prog,0x28,a)}
397local res = {T.testC(prog,0x28,a)}
398assert((a[0x28] == a))
398assert((a[0x28] == a))
399−assert(# ((res == 0x1) and (res[0x1] == prog)))
399+assert((# ((res == 0x1) and (res[0x1] == prog))))
400local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
400local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
401local res = {T.testC(prog,a)}
401local res = {T.testC(prog,a)}
402assert((a[0x64] == a))
402assert((a[0x64] == a))
403−assert(# ((res == 0x1) and (res[0x1] == prog)))
403+assert((# ((res == 0x1) and (res[0x1] == prog))))
404local prog = "\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{32}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
404local prog = "\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{32}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
405local res = {T.testC(prog,a)}
405local res = {T.testC(prog,a)}
406assert((a[0xc8] == a))
406assert((a[0xc8] == a))
407−assert(# ((res == 0x1) and (res[0x1] == prog)))
407+assert((# ((res == 0x1) and (res[0x1] == prog))))
408end
408end
409a={["\u{78}"] = 0x0,["\u{79}"] = 0xc}
409a={["\u{78}"] = 0x0,["\u{79}"] = 0xc}
410x,y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,0x3,"\u{79}",0x4,"\u{78}")
410x,y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,0x3,"\u{79}",0x4,"\u{78}")
@@ -484,7 +484,7 @@ do
484assert((A(("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"):format(i)) == 0xa))
484assert((A(("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"):format(i)) == 0xa))
485end
485end
486assert(A("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
486assert(A("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487−assert(not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487+assert((not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
488end
488end
489checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",debug.setuservalue,0x3,{})
489checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",debug.setuservalue,0x3,{})
490checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{69}\u{6c}",debug.setuservalue,nil,{})
490checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{69}\u{6c}",debug.setuservalue,nil,{})
@@ -496,10 +496,10 @@ local v,p = debug.getuservalue(b,i)
496assert(((v == nil) and p))
496assert(((v == nil) and p))
497end
497end
498do
498do
499−local v,p = debug.getuservalue(b,- 0x2)
499+local v,p = debug.getuservalue(b,(- 0x2))
500−assert(((v == nil) and not p))
500+assert(((v == nil) and (not p)))
501local v,p = debug.getuservalue(b,0xb)
501local v,p = debug.getuservalue(b,0xb)
502−assert(((v == nil) and not p))
502+assert(((v == nil) and (not p)))
503end
503end
504local t = {true,false,4.56,print,{},b,"\u{58}\u{59}\u{5a}"}
504local t = {true,false,4.56,print,{},b,"\u{58}\u{59}\u{5a}"}
505for k,v in ipairs(t)
505for k,v in ipairs(t)
@@ -511,7 +511,7 @@ do
511local v1,p = debug.getuservalue(b,k)
511local v1,p = debug.getuservalue(b,k)
512assert(((v1 == v) and p))
512assert(((v1 == v) and p))
513end
513end
514−assert(not debug.getuservalue(0x4))
514+assert((not debug.getuservalue(0x4)))
515debug.setuservalue(b,function ()
515debug.setuservalue(b,function ()
516return 0xa
516return 0xa
517end,0xa)
517end,0xa)
@@ -551,10 +551,10 @@ for i = 0x1, Lim
551do
551do
552Arr[i]=T.ref({})
552Arr[i]=T.ref({})
553end
553end
554−assert((T.ref(nil) == - (0x1 and (T.getref(- 0x1) == nil))))
554+assert((T.ref(nil) == (- (0x1 and (T.getref((- 0x1)) == nil)))))
555−T.unref(- 0x1)
555+T.unref((- 0x1))
556;
556;
557−T.unref(- 0x1)
557+T.unref((- 0x1))
558for i = 0x1, Lim
558for i = 0x1, Lim
559do
559do
560T.unref(Arr[i])
560T.unref(Arr[i])
@@ -578,7 +578,7 @@ do
578T.unref(Arr[i])
578T.unref(Arr[i])
579end
579end
580assert((type(T.getref(Arr[0x2])) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
580assert((type(T.getref(Arr[0x2])) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
581−assert((T.getref(- 0x1) == nil))
581+assert((T.getref((- 0x1)) == nil))
582a=T.ref({})
582a=T.ref({})
583collectgarbage()
583collectgarbage()
584assert((type(T.getref(a)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
584assert((type(T.getref(a)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
@@ -595,7 +595,7 @@ local d = T.newuserdata(0x64)
595d=nil
595d=nil
596assert((debug.getmetatable(x).__gc == F))
596assert((debug.getmetatable(x).__gc == F))
597assert(load("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{7b}\u{7d}\u{29}"))()
597assert(load("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{7b}\u{7d}\u{29}"))()
598−assert(not collectgarbage())
598+assert((not collectgarbage()))
599local dummy = {}
599local dummy = {}
600if (A ~= nil) then
600if (A ~= nil) then
601assert((type(A) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
601assert((type(A) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
@@ -686,7 +686,7 @@ T.unref(e)
686;
686;
687T.unref(f)
687T.unref(f)
688collectgarbage()
688collectgarbage()
689−assert(# ((cl == 0x1) and (cl[0x1] == nc)))
689+assert((# ((cl == 0x1) and (cl[0x1] == nc))))
690x=T.getref(d)
690x=T.getref(d)
691assert(((type(x) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (debug.getmetatable(x) == tt)))
691assert(((type(x) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (debug.getmetatable(x) == tt)))
692x=nil
692x=nil
@@ -700,11 +700,11 @@ local n5 = T.newuserdata(0x0)
700debug.setmetatable(n5,{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
700debug.setmetatable(n5,{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
701n5=T.udataval(n5)
701n5=T.udataval(n5)
702collectgarbage()
702collectgarbage()
703−assert(# (cl == 0x4))
703+assert((# (cl == 0x4)))
704assert((((cl[0x2] == n5) and (cl[0x3] == nb)) and (cl[0x4] == na)))
704assert((((cl[0x2] == n5) and (cl[0x3] == nb)) and (cl[0x4] == na)))
705collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
705collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
706a,na={},{}
706a,na={},{}
707−for i = 0x1e, 0x1, - 0x1
707+for i = 0x1e, 0x1, (- 0x1)
708do
708do
709a[i]=T.newuserdata(0x0)
709a[i]=T.newuserdata(0x0)
710debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
710debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
@@ -714,7 +714,7 @@ cl={}
714a=nil
714a=nil
715;
715;
716collectgarbage()
716collectgarbage()
717−assert(# (cl == 0x1e))
717+assert((# (cl == 0x1e)))
718for i = 0x1, 0x1e
718for i = 0x1, 0x1e
719do
719do
720assert((cl[i] == na[i]))
720assert((cl[i] == na[i]))
@@ -732,19 +732,19 @@ cl={}
732a={[x] = 0x1}
732a={[x] = 0x1}
733x=T.udataval(x)
733x=T.udataval(x)
734collectgarbage()
734collectgarbage()
735−assert(# (cl == 0x0))
735+assert((# (cl == 0x0)))
736for n in pairs(a)
736for n in pairs(a)
737do
737do
738a[n]=undef
738a[n]=undef
739end
739end
740collectgarbage()
740collectgarbage()
741−assert(# ((cl == 0x1) and (cl[0x1] == x)))
741+assert((# ((cl == 0x1) and (cl[0x1] == x))))
742assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",print,0x1,print,0x14))
742assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",print,0x1,print,0x14))
743assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{33}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{61}\u{6c}\u{6f}","\u{61}\u{6c}\u{6f}"))
743assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{33}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{61}\u{6c}\u{6f}","\u{61}\u{6c}\u{6f}"))
744assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",nil,nil))
744assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",nil,nil))
745−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{}))
745+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{})))
746−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
746+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
747−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3))
747+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3)))
748do
748do
749local map = {}
749local map = {}
750local t = {["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
750local t = {["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
@@ -760,7 +760,7 @@ end
760assert((f(0xa) == f(0xa)))
760assert((f(0xa) == f(0xa)))
761assert((f(0xa) ~= f(0xb)))
761assert((f(0xa) ~= f(0xb)))
762assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0xa)))
762assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0xa)))
763−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0x14)))
763+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0x14))))
764t.__eq=nil
764t.__eq=nil
765assert((f(0xa) ~= f(0xa)))
765assert((f(0xa) ~= f(0xa)))
766end
766end
@@ -839,7 +839,7 @@ T.closestate(T.newstate())
839L1=T.newstate()
839L1=T.newstate()
840assert(L1)
840assert(L1)
841assert((T.doremote(L1,"\u{58}\u{3d}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{27}") == "\u{61}"))
841assert((T.doremote(L1,"\u{58}\u{3d}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{27}") == "\u{61}"))
842−assert(# (pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0x0))
842+assert((# (pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0x0)))
843a,b=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{28}\u{29}")
843a,b=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{28}\u{29}")
844assert(((a == "\u{61}\u{6c}\u{6f}") and (b == "\u{33}")))
844assert(((a == "\u{61}\u{6c}\u{6f}") and (b == "\u{33}")))
845T.doremote(L1,"\u{5f}\u{45}\u{52}\u{52}\u{4f}\u{52}\u{4d}\u{45}\u{53}\u{53}\u{41}\u{47}\u{45}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}")
845T.doremote(L1,"\u{5f}\u{45}\u{52}\u{52}\u{4f}\u{52}\u{4d}\u{45}\u{53}\u{53}\u{41}\u{47}\u{45}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}")
@@ -866,27 +866,27 @@ local openresource = {}
866local function newresource
866local function newresource
867()
867()
868local x = setmetatable({0xa},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (y)
868local x = setmetatable({0xa},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (y)
869−assert((openresource[# openresource] == y))
869+assert((openresource[(# openresource)] == y))
870−openresource[# openresource]=nil
870+openresource[(# openresource)]=nil
871y[0x1]=(y[0x1] + 0x1)
871y[0x1]=(y[0x1] + 0x1)
872end})
872end})
873−openresource[# (openresource + 0x1)]=x
873+openresource[(# (openresource + 0x1))]=x
874return x
874return x
875end
875end
876local a,b = T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{62}\u{65}\u{20}\u{69}\u{67}\u{6e}\u{6f}\u{72}\u{65}\u{64}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)
876local a,b = T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{62}\u{65}\u{20}\u{69}\u{67}\u{6e}\u{6f}\u{72}\u{65}\u{64}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)
877assert(((a[0x1] == 0xb) and (b == nil)))
877assert(((a[0x1] == 0xb) and (b == nil)))
878−assert(# (openresource == 0x0))
878+assert((# (openresource == 0x0)))
879local a = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)}
879local a = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)}
880assert(((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (a[0x2][0x1] == 0xb)))
880assert(((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (a[0x2][0x1] == 0xb)))
881−assert(# (openresource == 0x0))
881+assert((# (openresource == 0x0)))
882local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{69}\u{73}\u{20}\u{74}\u{68}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}"),newresource)
882local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{69}\u{73}\u{20}\u{74}\u{68}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}"),newresource)
883assert(((a == false) and (b[0x1] == 0xb)))
883assert(((a == false) and (b[0x1] == 0xb)))
884−assert(# (openresource == 0x0))
884+assert((# (openresource == 0x0)))
885local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{72}\u{61}\u{69}\u{73}\u{65}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{62}\u{6f}\u{72}\u{74}\u{20}\u{20}\u{23}\u{20}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{65}\u{78}\u{65}\u{63}\u{75}\u{74}\u{65}\u{64}\u{a}\u{20}\u{20}"))
885local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{72}\u{61}\u{69}\u{73}\u{65}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{62}\u{6f}\u{72}\u{74}\u{20}\u{20}\u{23}\u{20}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{65}\u{78}\u{65}\u{63}\u{75}\u{74}\u{65}\u{64}\u{a}\u{20}\u{20}"))
886assert(((a == false) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
886assert(((a == false) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
887local function check
887local function check
888(n)
888(n)
889−assert(# (openresource == n))
889+assert((# (openresource == n)))
890end
890end
891_ENV.xxx=true
891_ENV.xxx=true
892local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{34}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{22}\u{78}\u{78}\u{78}\u{22}\u{20}\u{20}\u{23}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{6f}\u{70}\u{2e}\u{20}\u{65}\u{72}\u{61}\u{73}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
892local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{34}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{22}\u{78}\u{78}\u{78}\u{22}\u{20}\u{20}\u{23}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{6f}\u{70}\u{2e}\u{20}\u{65}\u{72}\u{61}\u{73}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
@@ -894,7 +894,7 @@ assert(((a == 0x3) and (_ENV.xxx == nil)))
894local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
894local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
895assert((a == 0x3))
895assert((a == 0x3))
896local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}"))
896local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}"))
897−assert(not (a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
897+assert((not (a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))))
898end
898end
899print("\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{2d}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
899print("\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{2d}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
900checkerr("\u{62}\u{6c}\u{6f}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{62}\u{69}\u{67}",T.newuserdata,math.maxinteger)
900checkerr("\u{62}\u{6c}\u{6f}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{62}\u{69}\u{67}",T.newuserdata,math.maxinteger)
@@ -1041,10 +1041,10 @@ _G.AA=nil
1041local t = os.tmpname()
1041local t = os.tmpname()
1042testamem("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
1042testamem("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
1043local f = assert(io.open(t,"\u{77}"))
1043local f = assert(io.open(t,"\u{77}"))
1044−assert(not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
1044+assert((not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")))
1045io.close(f)
1045io.close(f)
1046;
1046;
1047−return not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")
1047+return (not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
1048end)
1048end)
1049assert(os.remove(t))
1049assert(os.remove(t))
1050testamem("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
1050testamem("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
@@ -1121,7 +1121,7 @@ end
1121do
1121do
1122local L = T.newstate()
1122local L = T.newstate()
1123T.loadlib(L)
1123T.loadlib(L)
1124−local res = (T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}"))
1124+local res = T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}")
1125assert((res == "\u{6f}\u{6b}"))
1125assert((res == "\u{6f}\u{6b}"))
1126T.closestate(L)
1126T.closestate(L)
1127end
1127end
@@ -1140,7 +1140,7 @@ assert((gsub("\u{2e}\u{2e}\u{2e}","\u{2e}\u{2e}\u{2e}","") == ""))
1140local mt_xuxu,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1140local mt_xuxu,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1141assert((((type(mt_xuxu) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and res) and (top == 0x3)))
1141assert((((type(mt_xuxu) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and res) and (top == 0x3)))
1142local d,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1142local d,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1143−assert(((mt_xuxu == d) and not (res and (top == 0x3))))
1143+assert(((mt_xuxu == d) and (not (res and (top == 0x3)))))
1144d,res,top=T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1144d,res,top=T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1145assert((((mt_xuxu ~= d) and res) and (top == 0x3)))
1145assert((((mt_xuxu ~= d) and res) and (top == 0x3)))
1146x=T.newuserdata(0x0)
1146x=T.newuserdata(0x0)
@@ -1152,11 +1152,11 @@ assert((getmetatable(x) == mt_xuxu))
1152local res1,res2,top = T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{20}\u{20}\u{20}\u{9}\u{20}\u{9}\u{9}\u{9}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1152local res1,res2,top = T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{20}\u{20}\u{20}\u{9}\u{20}\u{9}\u{9}\u{9}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1153assert(((res1 and res2) and (top == 0x4)))
1153assert(((res1 and res2) and (top == 0x4)))
1154res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1154res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1155−assert(not (res1 and not (res2 and (top == 0x4))))
1155+assert((not (res1 and (not (res2 and (top == 0x4))))))
1156res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1156res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1157−assert(not (res1 and not (res2 and (top == 0x4))))
1157+assert((not (res1 and (not (res2 and (top == 0x4))))))
1158res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",y)
1158res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",y)
1159−assert(not (res1 and not (res2 and (top == 0x4))))
1159+assert((not (res1 and (not (res2 and (top == 0x4))))))
1160do
1160do
1161local r = debug.getregistry()
1161local r = debug.getregistry()
1162assert(((r.xuxu == mt_xuxu) and (r.xuxu1 == d)))
1162assert(((r.xuxu == mt_xuxu) and (r.xuxu1 == d)))
desk/res/lua/cycled/attrib.lua+45−45
@@ -18,19 +18,19 @@ for i = 0x1, max
18do
18do
19t[i]=string.rep("\u{3f}",((i % 0xa) + 0x1))
19t[i]=string.rep("\u{3f}",((i % 0xa) + 0x1))
20end
20end
21−t[# (t + 0x1)]="\u{3b}"
21+t[(# (t + 0x1))]="\u{3b}"
22local path = table.concat(t,"\u{3b}")
22local path = table.concat(t,"\u{3b}")
23local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
23local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
24−assert(not ((s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",0xa))) and # (string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)))
24+assert((not ((s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",0xa))) and (# (string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)))))
25local path = string.rep("\u{3f}",max)
25local path = string.rep("\u{3f}",max)
26local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
26local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
27−assert(not (s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max))))
27+assert((not (s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max)))))
28end
28end
29do
29do
30local oldpath = package.path
30local oldpath = package.path
31package.path={}
31package.path={}
32local s,err = pcall(require,"\u{6e}\u{6f}\u{2d}\u{73}\u{75}\u{63}\u{68}\u{2d}\u{66}\u{69}\u{6c}\u{65}")
32local s,err = pcall(require,"\u{6e}\u{6f}\u{2d}\u{73}\u{75}\u{63}\u{68}\u{2d}\u{66}\u{69}\u{6c}\u{65}")
33−assert(not (s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}")))
33+assert((not (s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}"))))
34package.path=oldpath
34package.path=oldpath
35end
35end
36do
36do
@@ -46,7 +46,7 @@ package.path=oldpath
46package.cpath=oldcpath
46package.cpath=oldcpath
47end
47end
48print("\u{2b}")
48print("\u{2b}")
49−if not _port then
49+if (not _port) then
50local dirsep = string.match(package.config,"\u{5e}\u{28}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{29}\u{a}")
50local dirsep = string.match(package.config,"\u{5e}\u{28}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{29}\u{a}")
51local DIR = ("\u{6c}\u{69}\u{62}\u{73}" .. dirsep)
51local DIR = ("\u{6c}\u{69}\u{62}\u{73}" .. dirsep)
52local function D
52local function D
@@ -100,9 +100,9 @@ end
100local a = require("\u{6e}\u{61}\u{6d}\u{65}\u{73}")
100local a = require("\u{6e}\u{61}\u{6d}\u{65}\u{73}")
101assert(((a[0x1] == "\u{6e}\u{61}\u{6d}\u{65}\u{73}") and (a[0x2] == D("\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"))))
101assert(((a[0x1] == "\u{6e}\u{61}\u{6d}\u{65}\u{73}") and (a[0x2] == D("\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"))))
102local st,msg = pcall(require,"\u{65}\u{72}\u{72}")
102local st,msg = pcall(require,"\u{65}\u{72}\u{72}")
103−assert(not ((st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}")) and (B == 0xf)))
103+assert((not ((st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}")) and (B == 0xf))))
104st,msg=pcall(require,"\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}")
104st,msg=pcall(require,"\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}")
105−assert(not (st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}")))
105+assert((not (st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}"))))
106assert((package.searchpath("\u{43}",package.path) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
106assert((package.searchpath("\u{43}",package.path) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
107assert((require("\u{43}") == 0x19))
107assert((require("\u{43}") == 0x19))
108assert((require("\u{43}") == 0x19))
108assert((require("\u{43}") == 0x19))
@@ -149,9 +149,9 @@ assert(((require("\u{50}\u{31}") == m) and (m.AA == 0xa)))
149removefiles(files)
149removefiles(files)
150AA=nil
150AA=nil
151package.path=""
151package.path=""
152−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}"))
152+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}")))
153package.path="\u{3f}\u{3f}\u{0}\u{3f}"
153package.path="\u{3f}\u{3f}\u{0}\u{3f}"
154−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}"))
154+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}")))
155package.path=oldpath
155package.path=oldpath
156local fname = "\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{32}"
156local fname = "\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{32}"
157local m,err = pcall(require,fname)
157local m,err = pcall(require,fname)
@@ -164,25 +164,25 @@ do
164local searchers = package.searchers
164local searchers = package.searchers
165package.searchers=0x3
165package.searchers=0x3
166local st,msg = pcall(require,"\u{61}")
166local st,msg = pcall(require,"\u{61}")
167−assert(not (st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}")))
167+assert((not (st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}"))))
168package.searchers=searchers
168package.searchers=searchers
169end
169end
170local function import
170local function import
171(...)
171(...)
172local f = {...}
172local f = {...}
173return function (m)
173return function (m)
174−for i = 0x1, # f
174+for i = 0x1, (# f)
175do
175do
176m[f[i]]=_G[f[i]]
176m[f[i]]=_G[f[i]]
177end
177end
178end
178end
179end
179end
180−assert(not pcall(module,"\u{58}\u{55}\u{58}\u{55}"))
180+assert((not pcall(module,"\u{58}\u{55}\u{58}\u{55}")))
181local p = ""
181local p = ""
182local st,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),"\u{2a}")
182local st,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),"\u{2a}")
183−if not st then
183+if (not st) then
184local f,err,when = package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
184local f,err,when = package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
185−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}")))
185+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}"))))
186;
186;
187(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
187(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
188print(err,when)
188print(err,when)
@@ -193,9 +193,9 @@ assert(((a == 0x19) and (b == 0xf)))
193f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{66}\u{75}\u{6e}\u{63}")))
193f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{66}\u{75}\u{6e}\u{63}")))
194assert((f(0xa,0x14) == "\u{31}\u{30}\u{25}\u{32}\u{30}\u{a}"))
194assert((f(0xa,0x14) == "\u{31}\u{30}\u{25}\u{32}\u{30}\u{a}"))
195local f,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{78}\u{75}\u{78}\u{75}"))
195local f,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{78}\u{75}\u{78}\u{75}"))
196−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{69}\u{6e}\u{69}\u{74}")))
196+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{69}\u{6e}\u{69}\u{74}"))))
197f,err,when=package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
197f,err,when=package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
198−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{6f}\u{70}\u{65}\u{6e}")))
198+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{6f}\u{70}\u{65}\u{6e}"))))
199f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}\u{31}"),(p .. "\u{6c}\u{75}\u{61}\u{6f}\u{70}\u{65}\u{6e}\u{5f}\u{6c}\u{69}\u{62}\u{31}\u{31}")))
199f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}\u{31}"),(p .. "\u{6c}\u{75}\u{61}\u{6f}\u{70}\u{65}\u{6e}\u{5f}\u{6c}\u{69}\u{62}\u{31}\u{31}")))
200assert((f() == "\u{65}\u{78}\u{70}\u{6f}\u{72}\u{74}\u{65}\u{64}"))
200assert((f() == "\u{65}\u{78}\u{70}\u{6f}\u{72}\u{74}\u{65}\u{64}"))
201package.cpath=DC("\u{3f}")
201package.cpath=DC("\u{3f}")
@@ -265,7 +265,7 @@ a,b,c=0x0,0x5,f(0x0)
265assert((((a == 0x0) and (b == 0x5)) and (c == nil)))
265assert((((a == 0x0) and (b == 0x5)) and (c == nil)))
266end
266end
267local a,b,c,d = (0x1 and nil),(0x1 or nil),(0x1 and (nil or 0x1)),0x6
267local a,b,c,d = (0x1 and nil),(0x1 or nil),(0x1 and (nil or 0x1)),0x6
268−assert(not (((a and b) and c) and (d == 0x6)))
268+assert((not (((a and b) and c) and (d == 0x6))))
269d=0x14
269d=0x14
270a,b,c,d=f()
270a,b,c,d=f()
271assert(((((a == 0xa) and (b == 0xb)) and (c == 0xc)) and (d == nil)))
271assert(((((a == 0xa) and (b == 0xb)) and (c == 0xc)) and (d == nil)))
@@ -275,7 +275,7 @@ assert((((a < b) == false) and ((a > b) == true)))
275assert(((0xa and 0x2) == 0x2))
275assert(((0xa and 0x2) == 0x2))
276assert(((0xa or 0x2) == 0xa))
276assert(((0xa or 0x2) == 0xa))
277assert(((0xa or assert(nil)) == 0xa))
277assert(((0xa or assert(nil)) == 0xa))
278−assert(not (nil and assert(nil)))
278+assert((not (nil and assert(nil))))
279assert(((nil or "\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}"))
279assert(((nil or "\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}"))
280assert(((nil and 0xa) == nil))
280assert(((nil and 0xa) == nil))
281assert(((false and 0xa) == false))
281assert(((false and 0xa) == false))
@@ -283,17 +283,17 @@ assert(((true or 0xa) == true))
283assert(((false or 0xa) == 0xa))
283assert(((false or 0xa) == 0xa))
284assert((false ~= nil))
284assert((false ~= nil))
285assert((nil ~= false))
285assert((nil ~= false))
286−assert(not (nil == true))
286+assert((not (nil == true)))
287−assert(not not (nil == false))
287+assert((not (not (nil == false))))
288−assert(not not (0x1 == true))
288+assert((not (not (0x1 == true))))
289−assert(not not (a == true))
289+assert((not (not (a == true))))
290−assert(not not ((0x6 or nil) == true))
290+assert((not (not ((0x6 or nil) == true))))
291−assert(not not ((nil and 0x38) == false))
291+assert((not (not ((nil and 0x38) == false))))
292−assert(not not ((nil and true) == false))
292+assert((not (not ((nil and true) == false))))
293−assert(not (0xa == false))
293+assert((not (0xa == false)))
294−assert(not ({} == false))
294+assert((not ({} == false)))
295−assert(not (0.5 == false))
295+assert((not (0.5 == false)))
296−assert(not ("\u{78}" == false))
296+assert((not ("\u{78}" == false)))
297assert(({} ~= {}))
297assert(({} ~= {}))
298print("\u{2b}")
298print("\u{2b}")
299a={}
299a={}
@@ -304,7 +304,7 @@ function f(a)
304return a
304return a
305end
305end
306local a = {}
306local a = {}
307−for i = 0xbb8, - 0xbb8, - 0x1
307+for i = 0xbb8, (- 0xbb8), (- 0x1)
308do
308do
309a[(i + 0.0)]=i
309a[(i + 0.0)]=i
310;
310;
@@ -314,8 +314,8 @@ a[1e31]="\u{61}\u{6c}\u{6f}"
314a[true]=0xa
314a[true]=0xa
315;
315;
316a[false]=0x14
316a[false]=0x14
317−assert((((a[1e31] == "\u{61}\u{6c}\u{6f}") and (a[not 0x1] == 0x14)) and (a[(0xa < 0x14)] == 0xa)))
317+assert((((a[1e31] == "\u{61}\u{6c}\u{6f}") and (a[(not 0x1)] == 0x14)) and (a[(0xa < 0x14)] == 0xa)))
318−for i = 0xbb8, - 0xbb8, - 0x1
318+for i = 0xbb8, (- 0xbb8), (- 0x1)
319do
319do
320assert((a[i] == i))
320assert((a[i] == i))
321;
321;
@@ -325,20 +325,20 @@ a[f]=print
325a[a]=a
325a[a]=a
326assert((a[a][a][a][a][print] == assert))
326assert((a[a][a][a][a][print] == assert))
327a[print]((a[a[f]] == a[print]))
327a[print]((a[a[f]] == a[print]))
328−assert(not pcall(function ()
328+assert((not pcall(function ()
329local a = {}
329local a = {}
330;
330;
331a[nil]=0xa
331a[nil]=0xa
332−end))
332+end)))
333−assert(not pcall(function ()
333+assert((not pcall(function ()
334local a = {[nil] = 0xa}
334local a = {[nil] = 0xa}
335−end))
335+end)))
336assert((a[nil] == undef))
336assert((a[nil] == undef))
337a=nil
337a=nil
338local a,b,c
338local a,b,c
339−a={0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,[- 0x3] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
339+a={0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,[(- 0x3)] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
340−a,a.x,a.y=a,a[- 0x3]
340+a,a.x,a.y=a,a[(- 0x3)]
341−assert((((((a[0x1] == 0xa) and (a[- 0x3] == a.a)) and (a[f] == print)) and (a.x == "\u{61}")) and not a.y))
341+assert((((((a[0x1] == 0xa) and (a[(- 0x3)] == a.a)) and (a[f] == print)) and (a.x == "\u{61}")) and (not a.y)))
342a[0x1],f(a)[0x2],b,c={["\u{61}\u{6c}\u{6f}"] = assert},0xa,a[0x1],a[f],0x6,0xa,0x17,f(a),0x2
342a[0x1],f(a)[0x2],b,c={["\u{61}\u{6c}\u{6f}"] = assert},0xa,a[0x1],a[f],0x6,0xa,0x17,f(a),0x2
343a[0x1].alo((((a[0x2] == 0xa) and (b == 0xa)) and (c == print)))
343a[0x1].alo((((a[0x2] == 0xa) and (b == 0xa)) and (c == print)))
344a.aVeryLongName012345678901234567890123456789012345678901234567890123456789=0xa
344a.aVeryLongName012345678901234567890123456789012345678901234567890123456789=0xa
@@ -354,7 +354,7 @@ local _ENV <const> = 0xb
354X="\u{68}\u{69}"
354X="\u{68}\u{69}"
355end
355end
356local st,msg = pcall(foo)
356local st,msg = pcall(foo)
357−assert(not (st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
357+assert((not (st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
358end
358end
359local maxint = math.maxinteger
359local maxint = math.maxinteger
360while ((maxint ~= (maxint + 0.0)) or ((maxint - 0x1) ~= (maxint - 1.0))) do
360while ((maxint ~= (maxint + 0.0)) or ((maxint - 0x1) ~= (maxint - 1.0))) do
@@ -366,14 +366,14 @@ a[maxintF]=0xa
366;
366;
367a[(maxintF - 1.0)]=0xb
367a[(maxintF - 1.0)]=0xb
368;
368;
369−a[- maxintF]=0xc
369+a[(- maxintF)]=0xc
370;
370;
371−a[- (maxintF + 1.0)]=0xd
371+a[(- (maxintF + 1.0))]=0xd
372;
372;
373−assert(((((a[maxint] == 0xa) and (a[(maxint - 0x1)] == 0xb)) and (a[- maxint] == 0xc)) and (a[- (maxint + 0x1)] == 0xd)))
373+assert(((((a[maxint] == 0xa) and (a[(maxint - 0x1)] == 0xb)) and (a[(- maxint)] == 0xc)) and (a[(- (maxint + 0x1))] == 0xd)))
374a[maxint]=0x14
374a[maxint]=0x14
375−a[- maxint]=0x16
375+a[(- maxint)]=0x16
376−assert(((((a[maxintF] == 0x14) and (a[(maxintF - 1.0)] == 0xb)) and (a[- maxintF] == 0x16)) and (a[- (maxintF + 1.0)] == 0xd)))
376+assert(((((a[maxintF] == 0x14) and (a[(maxintF - 1.0)] == 0xb)) and (a[(- maxintF)] == 0x16)) and (a[(- (maxintF + 1.0))] == 0xd)))
377a=nil
377a=nil
378do
378do
379local a,i,j,b
379local a,i,j,b
desk/res/lua/cycled/bar.luanew file+2
@@ -0,0 +1,2 @@
1+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
2+x=(- (0x2 ^ (- (0x3 ^ 0x4))))
desk/res/lua/cycled/big.lua+8−8
@@ -7,12 +7,12 @@ local lim = ((0x2 ^ 0x12) + 0x3e8)
7local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{7b}\u{30}"}
7local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{7b}\u{30}"}
8for i = 0x1, lim
8for i = 0x1, lim
9do
9do
10−prog[# (prog + 0x1)]=i
10+prog[(# (prog + 0x1))]=i
11end
11end
12−prog[# (prog + 0x1)]="\u{7d}\u{a}"
12+prog[(# (prog + 0x1))]="\u{7d}\u{a}"
13−prog[# (prog + 0x1)]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
13+prog[(# (prog + 0x1))]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
14−prog[# (prog + 0x1)]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format((lim - 0x1),(lim - 0x2))
14+prog[(# (prog + 0x1))]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format((lim - 0x1),(lim - 0x2))
15−prog[# (prog + 0x1)]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
15+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
16prog=table.concat(prog,"\u{3b}")
16prog=table.concat(prog,"\u{3b}")
17local env = {["\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = string,["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert}
17local env = {["\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = string,["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert}
18local f = assert(load(prog,nil,nil,env))
18local f = assert(load(prog,nil,nil,env))
@@ -45,12 +45,12 @@ getmetatable(env).__newindex=function ()
45
45
46end
46end
47local e,m = pcall(f)
47local e,m = pcall(f)
48−assert(not (e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}")))
48+assert((not (e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}"))))
49getmetatable(env).__newindex=function ()
49getmetatable(env).__newindex=function ()
50error("\u{68}\u{69}")
50error("\u{68}\u{69}")
51end
51end
52local e,m = xpcall(f,debug.traceback)
52local e,m = xpcall(f,debug.traceback)
53−assert(not (e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}")))
53+assert((not (e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}"))))
54f,X=nil
54f,X=nil
55coroutine.yield("\u{62}")
55coroutine.yield("\u{62}")
56if ((0x2 ^ 0x20) == 0x0) then
56if ((0x2 ^ 0x20) == 0x0) then
@@ -61,7 +61,7 @@ assert(((repstrings * ssize) > (2.0 ^ 0x20)))
61local longs = string.rep("\u{0}",ssize)
61local longs = string.rep("\u{0}",ssize)
62local rep = assert(load(("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. string.rep("\u{61}",repstrings,"\u{2e}\u{2e}"))))
62local rep = assert(load(("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. string.rep("\u{61}",repstrings,"\u{2e}\u{2e}"))))
63local a,b = pcall(rep,longs)
63local a,b = pcall(rep,longs)
64−assert(not (a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))
64+assert((not (a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
65end
65end
66print("\u{4f}\u{4b}")
66print("\u{4f}\u{4b}")
67return "\u{61}"
67return "\u{61}"
desk/res/lua/cycled/bitwise.lua+75−75
@@ -1,15 +1,15 @@
1print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
1print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
2require("\u{62}\u{77}\u{63}\u{6f}\u{65}\u{72}\u{63}\u{69}\u{6f}\u{6e}")
2require("\u{62}\u{77}\u{63}\u{6f}\u{65}\u{72}\u{63}\u{69}\u{6f}\u{6e}")
3local numbits = (string.packsize("\u{6a}") * 0x8)
3local numbits = (string.packsize("\u{6a}") * 0x8)
4−assert(~ (0x0 == - 0x1))
4+assert((~ (0x0 == (- 0x1))))
5assert(((0x1 << (numbits - 0x1)) == math.mininteger))
5assert(((0x1 << (numbits - 0x1)) == math.mininteger))
6local a,b,c,d
6local a,b,c,d
7a=0xffffffffffffffff
7a=0xffffffffffffffff
8−assert((a == - (0x1 and (a & - ((0x1 == a) and ((a & 0x23) == 0x23))))))
8+assert((a == (- (0x1 and (a & (- ((0x1 == a) and ((a & 0x23) == 0x23))))))))
9a=0xf0f0f0f0f0f0f0f0
9a=0xf0f0f0f0f0f0f0f0
10−assert((a | - (0x1 == - 0x1)))
10+assert((a | (- (0x1 == (- 0x1)))))
11−assert(((((a ~ a) == 0x0) and ((a ~ 0x0) == a)) and (a ~ ~ (a == - 0x1))))
11+assert(((((a ~ a) == 0x0) and ((a ~ 0x0) == a)) and (a ~ (~ (a == (- 0x1))))))
12−assert(((a >> 0x4) == ~ a))
12+assert(((a >> 0x4) == (~ a)))
13a=0xf0
13a=0xf0
14;
14;
15b=0xcc
15b=0xcc
@@ -34,13 +34,13 @@ c=0xaa000000
34;
34;
35d=0xfd000000
35d=0xfd000000
36assert(((a | (b ~ (c & d))) == 0xf4000000))
36assert(((a | (b ~ (c & d))) == 0xf4000000))
37−assert(~ ~ ((a == a) and ~ (a == - ((0x1 ~ a) and - (d == ~ (d + 0x1))))))
37+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
38a=(a << 0x20)
38a=(a << 0x20)
39b=(b << 0x20)
39b=(b << 0x20)
40c=(c << 0x20)
40c=(c << 0x20)
41d=(d << 0x20)
41d=(d << 0x20)
42assert(((a | (b ~ (c & d))) == (0xf4000000 << 0x20)))
42assert(((a | (b ~ (c & d))) == (0xf4000000 << 0x20)))
43−assert(~ ~ ((a == a) and ~ (a == - ((0x1 ~ a) and - (d == ~ (d + 0x1))))))
43+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
44do
44do
45local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.maxinteger)
45local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.maxinteger)
46assert((load(code)() == 0x0))
46assert((load(code)() == 0x0))
@@ -51,23 +51,23 @@ assert((load(code)() == 0x0))
51local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.mininteger)
51local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.mininteger)
52assert((load(code)() == 0x0))
52assert((load(code)() == 0x0))
53end
53end
54−assert(- (((0x1 >> 0x1) == ((0x1 << (numbits - 0x1)) - 0x1)) and ((0x1 << 0x1f) == 0x80000000)))
54+assert((- (((0x1 >> 0x1) == ((0x1 << (numbits - 0x1)) - 0x1)) and ((0x1 << 0x1f) == 0x80000000))))
55−assert(- ((0x1 >> (numbits - 0x1)) == 0x1))
55+assert((- ((0x1 >> (numbits - 0x1)) == 0x1)))
56−assert(- (((0x1 >> numbits) == 0x0) and - (0x1 >> - ((numbits == 0x0) and - (((0x1 << numbits) == 0x0) and - (0x1 << - (numbits == 0x0)))))))
56+assert((- (((0x1 >> numbits) == 0x0) and (- (0x1 >> (- ((numbits == 0x0) and (- (((0x1 << numbits) == 0x0) and (- (0x1 << (- (numbits == 0x0)))))))))))))
57assert(((0x1 >> math.mininteger) == 0x0))
57assert(((0x1 >> math.mininteger) == 0x0))
58assert(((0x1 >> math.maxinteger) == 0x0))
58assert(((0x1 >> math.maxinteger) == 0x0))
59assert(((0x1 << math.mininteger) == 0x0))
59assert(((0x1 << math.mininteger) == 0x0))
60assert(((0x1 << math.maxinteger) == 0x0))
60assert(((0x1 << math.maxinteger) == 0x0))
61assert(((((0x2 ^ 0x1e) - 0x1) << (0x2 ^ 0x1e)) == 0x0))
61assert(((((0x2 ^ 0x1e) - 0x1) << (0x2 ^ 0x1e)) == 0x0))
62assert(((((0x2 ^ 0x1e) - 0x1) >> (0x2 ^ 0x1e)) == 0x0))
62assert(((((0x2 ^ 0x1e) - 0x1) >> (0x2 ^ 0x1e)) == 0x0))
63−assert((0x1 >> - ((0x3 == (0x1 << 0x3)) and ((0x3e8 >> 0x5) == (0x3e8 << - 0x5)))))
63+assert((0x1 >> (- ((0x3 == (0x1 << 0x3)) and ((0x3e8 >> 0x5) == (0x3e8 << (- 0x5)))))))
64−assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0x0) == - 0x1))
64+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0x0) == (- 0x1)))
65−assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}") == - 0x2))
65+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}") == (- 0x2)))
66assert((("\u{20}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}\u{a}\u{9}" & "\u{2d}\u{31}") == 0x2))
66assert((("\u{20}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}\u{a}\u{9}" & "\u{2d}\u{31}") == 0x2))
67−assert((("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}") == - (0x2d * 0x4)))
67+assert((("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}") == (- (0x2d * 0x4))))
68assert((("\u{31}\u{32}\u{33}\u{34}\u{2e}\u{30}" << "\u{35}\u{2e}\u{30}") == (0x4d2 * 0x20)))
68assert((("\u{31}\u{32}\u{33}\u{34}\u{2e}\u{30}" << "\u{35}\u{2e}\u{30}") == (0x4d2 * 0x20)))
69assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" ~ "\u{30}\u{78}\u{41}\u{41}\u{41}\u{41}") == 0x5555))
69assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" ~ "\u{30}\u{78}\u{41}\u{41}\u{41}\u{41}") == 0x5555))
70−assert(~ ("\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == - 0x1))
70+assert((~ ("\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == (- 0x1))))
71assert(((("\u{37}" .. 0x3) << 0x1) == 0x92))
71assert(((("\u{37}" .. 0x3) << 0x1) == 0x92))
72assert(((0xffffffff >> (0x1 .. "\u{39}")) == 0x1fff))
72assert(((0xffffffff >> (0x1 .. "\u{39}")) == 0x1fff))
73assert(((0xa | (0x1 .. "\u{39}")) == 0x1b))
73assert(((0xa | (0x1 .. "\u{39}")) == 0x1b))
@@ -77,29 +77,29 @@ return (0x4 & "\u{61}")
77end)
77end)
78assert(string.find(msg,"\u{27}\u{62}\u{61}\u{6e}\u{64}\u{27}"))
78assert(string.find(msg,"\u{27}\u{62}\u{61}\u{6e}\u{64}\u{27}"))
79local st,msg = pcall(function ()
79local st,msg = pcall(function ()
80−return ~ "\u{61}"
80+return (~ "\u{61}")
81end)
81end)
82assert(string.find(msg,"\u{27}\u{62}\u{6e}\u{6f}\u{74}\u{27}"))
82assert(string.find(msg,"\u{27}\u{62}\u{6e}\u{6f}\u{74}\u{27}"))
83end
83end
84−assert(not pcall(function ()
84+assert((not pcall(function ()
85return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" | 0x0)
85return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" | 0x0)
86−end))
86+end)))
87−assert(not pcall(function ()
87+assert((not pcall(function ()
88return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{0}" | 0x0)
88return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{0}" | 0x0)
89−end))
89+end)))
90print("\u{2b}")
90print("\u{2b}")
91package.preload.bit32=function ()
91package.preload.bit32=function ()
92local bit = {}
92local bit = {}
93function bit.bnot(a)
93function bit.bnot(a)
94−return ~ (a & 0xffffffff)
94+return (~ (a & 0xffffffff))
95end
95end
96function bit.band(x,y,z, ...)
96function bit.band(x,y,z, ...)
97−if not z then
97+if (not z) then
98−return (((x or - 0x1) & (y or - 0x1)) & 0xffffffff)
98+return (((x or (- 0x1)) & (y or (- 0x1))) & 0xffffffff)
99else
99else
100local arg = {...}
100local arg = {...}
101local res = ((x & y) & z)
101local res = ((x & y) & z)
102−for i = 0x1, # arg
102+for i = 0x1, (# arg)
103do
103do
104res=(res & arg[i])
104res=(res & arg[i])
105end
105end
@@ -107,12 +107,12 @@ return (res & 0xffffffff)
107end
107end
108end
108end
109function bit.bor(x,y,z, ...)
109function bit.bor(x,y,z, ...)
110−if not z then
110+if (not z) then
111return (((x or 0x0) | (y or 0x0)) & 0xffffffff)
111return (((x or 0x0) | (y or 0x0)) & 0xffffffff)
112else
112else
113local arg = {...}
113local arg = {...}
114local res = ((x | y) | z)
114local res = ((x | y) | z)
115−for i = 0x1, # arg
115+for i = 0x1, (# arg)
116do
116do
117res=(res | arg[i])
117res=(res | arg[i])
118end
118end
@@ -120,12 +120,12 @@ return (res & 0xffffffff)
120end
120end
121end
121end
122function bit.bxor(x,y,z, ...)
122function bit.bxor(x,y,z, ...)
123−if not z then
123+if (not z) then
124return (((x or 0x0) ~ (y or 0x0)) & 0xffffffff)
124return (((x or 0x0) ~ (y or 0x0)) & 0xffffffff)
125else
125else
126local arg = {...}
126local arg = {...}
127local res = ((x ~ y) ~ z)
127local res = ((x ~ y) ~ z)
128−for i = 0x1, # arg
128+for i = 0x1, (# arg)
129do
129do
130res=(res ~ arg[i])
130res=(res ~ arg[i])
131end
131end
@@ -146,7 +146,7 @@ a=(a & 0xffffffff)
146if ((b <= 0x0) or ((a & 0x80000000) == 0x0)) then
146if ((b <= 0x0) or ((a & 0x80000000) == 0x0)) then
147return ((a >> b) & 0xffffffff)
147return ((a >> b) & 0xffffffff)
148else
148else
149−return (((a >> b) | ~ (0xffffffff >> b)) & 0xffffffff)
149+return (((a >> b) | (~ (0xffffffff >> b))) & 0xffffffff)
150end
150end
151end
151end
152function bit.lrotate(a,b)
152function bit.lrotate(a,b)
@@ -156,7 +156,7 @@ a=((a << b) | (a >> (0x20 - b)))
156return (a & 0xffffffff)
156return (a & 0xffffffff)
157end
157end
158function bit.rrotate(a,b)
158function bit.rrotate(a,b)
159−return bit.lrotate(a,- b)
159+return bit.lrotate(a,(- b))
160end
160end
161local function checkfield
161local function checkfield
162(f,w)
162(f,w)
@@ -164,7 +164,7 @@ w=(w or 0x1)
164assert((f >= 0x0),"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{65}\u{67}\u{61}\u{74}\u{69}\u{76}\u{65}")
164assert((f >= 0x0),"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{65}\u{67}\u{61}\u{74}\u{69}\u{76}\u{65}")
165assert((w > 0x0),"\u{77}\u{69}\u{64}\u{74}\u{68}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{76}\u{65}")
165assert((w > 0x0),"\u{77}\u{69}\u{64}\u{74}\u{68}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{76}\u{65}")
166assert(((f + w) <= 0x20),"\u{74}\u{72}\u{79}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{20}\u{62}\u{69}\u{74}\u{73}")
166assert(((f + w) <= 0x20),"\u{74}\u{72}\u{79}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{20}\u{62}\u{69}\u{74}\u{73}")
167−return f,~ (- (0x1 << w))
167+return f,(~ (- (0x1 << w)))
168end
168end
169function bit.extract(a,f,w)
169function bit.extract(a,f,w)
170local f,mask = checkfield(f,w)
170local f,mask = checkfield(f,w)
@@ -173,7 +173,7 @@ end
173function bit.replace(a,v,f,w)
173function bit.replace(a,v,f,w)
174local f,mask = checkfield(f,w)
174local f,mask = checkfield(f,w)
175v=(v & mask)
175v=(v & mask)
176−a=((a & ~ (mask << f)) | (v << f))
176+a=((a & (~ (mask << f))) | (v << f))
177return (a & 0xffffffff)
177return (a & 0xffffffff)
178end
178end
179return bit
179return bit
@@ -186,56 +186,56 @@ assert((bit32.bor() == 0x0))
186assert((bit32.bxor() == 0x0))
186assert((bit32.bxor() == 0x0))
187assert((bit32.band() == bit32.band(0xffffffff)))
187assert((bit32.band() == bit32.band(0xffffffff)))
188assert((bit32.band(0x1,0x2) == 0x0))
188assert((bit32.band(0x1,0x2) == 0x0))
189−assert((bit32.band(- 0x1) == 0xffffffff))
189+assert((bit32.band((- 0x1)) == 0xffffffff))
190assert((bit32.band(((0x1 << 0x21) - 0x1)) == 0xffffffff))
190assert((bit32.band(((0x1 << 0x21) - 0x1)) == 0xffffffff))
191−assert((bit32.band(- ((0x1 << 0x21) - 0x1)) == 0xffffffff))
191+assert((bit32.band((- ((0x1 << 0x21) - 0x1))) == 0xffffffff))
192assert((bit32.band(((0x1 << 0x21) + 0x1)) == 0x1))
192assert((bit32.band(((0x1 << 0x21) + 0x1)) == 0x1))
193−assert((bit32.band(- ((0x1 << 0x21) + 0x1)) == 0x1))
193+assert((bit32.band((- ((0x1 << 0x21) + 0x1))) == 0x1))
194−assert((bit32.band(- (0x1 << 0x28)) == 0x0))
194+assert((bit32.band((- (0x1 << 0x28))) == 0x0))
195assert((bit32.band((0x1 << 0x28)) == 0x0))
195assert((bit32.band((0x1 << 0x28)) == 0x0))
196−assert((bit32.band(- ((0x1 << 0x28) - 0x2)) == 0xfffffffe))
196+assert((bit32.band((- ((0x1 << 0x28) - 0x2))) == 0xfffffffe))
197assert((bit32.band(((0x1 << 0x28) - 0x4)) == 0xfffffffc))
197assert((bit32.band(((0x1 << 0x28) - 0x4)) == 0xfffffffc))
198−assert((bit32.lrotate(0x0,- 0x1) == 0x0))
198+assert((bit32.lrotate(0x0,(- 0x1)) == 0x0))
199assert((bit32.lrotate(0x0,0x7) == 0x0))
199assert((bit32.lrotate(0x0,0x7) == 0x0))
200assert((bit32.lrotate(0x12345678,0x0) == 0x12345678))
200assert((bit32.lrotate(0x12345678,0x0) == 0x12345678))
201assert((bit32.lrotate(0x12345678,0x20) == 0x12345678))
201assert((bit32.lrotate(0x12345678,0x20) == 0x12345678))
202assert((bit32.lrotate(0x12345678,0x4) == 0x23456781))
202assert((bit32.lrotate(0x12345678,0x4) == 0x23456781))
203−assert((bit32.rrotate(0x12345678,- 0x4) == 0x23456781))
203+assert((bit32.rrotate(0x12345678,(- 0x4)) == 0x23456781))
204−assert((bit32.lrotate(0x12345678,- 0x8) == 0x78123456))
204+assert((bit32.lrotate(0x12345678,(- 0x8)) == 0x78123456))
205assert((bit32.rrotate(0x12345678,0x8) == 0x78123456))
205assert((bit32.rrotate(0x12345678,0x8) == 0x78123456))
206assert((bit32.lrotate(0xaaaaaaaa,0x2) == 0xaaaaaaaa))
206assert((bit32.lrotate(0xaaaaaaaa,0x2) == 0xaaaaaaaa))
207−assert((bit32.lrotate(0xaaaaaaaa,- 0x2) == 0xaaaaaaaa))
207+assert((bit32.lrotate(0xaaaaaaaa,(- 0x2)) == 0xaaaaaaaa))
208−for i = - 0x32, 0x32
208+for i = (- 0x32), 0x32
209do
209do
210assert((bit32.lrotate(0x89abcdef,i) == bit32.lrotate(0x89abcdef,(i % 0x20))))
210assert((bit32.lrotate(0x89abcdef,i) == bit32.lrotate(0x89abcdef,(i % 0x20))))
211end
211end
212assert((bit32.lshift(0x12345678,0x4) == 0x23456780))
212assert((bit32.lshift(0x12345678,0x4) == 0x23456780))
213assert((bit32.lshift(0x12345678,0x8) == 0x34567800))
213assert((bit32.lshift(0x12345678,0x8) == 0x34567800))
214−assert((bit32.lshift(0x12345678,- 0x4) == 0x1234567))
214+assert((bit32.lshift(0x12345678,(- 0x4)) == 0x1234567))
215−assert((bit32.lshift(0x12345678,- 0x8) == 0x123456))
215+assert((bit32.lshift(0x12345678,(- 0x8)) == 0x123456))
216assert((bit32.lshift(0x12345678,0x20) == 0x0))
216assert((bit32.lshift(0x12345678,0x20) == 0x0))
217−assert((bit32.lshift(0x12345678,- 0x20) == 0x0))
217+assert((bit32.lshift(0x12345678,(- 0x20)) == 0x0))
218assert((bit32.rshift(0x12345678,0x4) == 0x1234567))
218assert((bit32.rshift(0x12345678,0x4) == 0x1234567))
219assert((bit32.rshift(0x12345678,0x8) == 0x123456))
219assert((bit32.rshift(0x12345678,0x8) == 0x123456))
220assert((bit32.rshift(0x12345678,0x20) == 0x0))
220assert((bit32.rshift(0x12345678,0x20) == 0x0))
221−assert((bit32.rshift(0x12345678,- 0x20) == 0x0))
221+assert((bit32.rshift(0x12345678,(- 0x20)) == 0x0))
222assert((bit32.arshift(0x12345678,0x0) == 0x12345678))
222assert((bit32.arshift(0x12345678,0x0) == 0x12345678))
223assert((bit32.arshift(0x12345678,0x1) == (0x12345678 // 0x2)))
223assert((bit32.arshift(0x12345678,0x1) == (0x12345678 // 0x2)))
224−assert((bit32.arshift(0x12345678,- 0x1) == (0x12345678 * 0x2)))
224+assert((bit32.arshift(0x12345678,(- 0x1)) == (0x12345678 * 0x2)))
225−assert((bit32.arshift(- 0x1,0x1) == 0xffffffff))
225+assert((bit32.arshift((- 0x1),0x1) == 0xffffffff))
226−assert((bit32.arshift(- 0x1,0x18) == 0xffffffff))
226+assert((bit32.arshift((- 0x1),0x18) == 0xffffffff))
227−assert((bit32.arshift(- 0x1,0x20) == 0xffffffff))
227+assert((bit32.arshift((- 0x1),0x20) == 0xffffffff))
228−assert((bit32.arshift(- 0x1,- 0x1) == bit32.band(- (0x1 * 0x2),0xffffffff)))
228+assert((bit32.arshift((- 0x1),(- 0x1)) == bit32.band((- (0x1 * 0x2)),0xffffffff)))
229assert(((0x12345678 << 0x4) == 0x123456780))
229assert(((0x12345678 << 0x4) == 0x123456780))
230assert(((0x12345678 << 0x8) == 0x1234567800))
230assert(((0x12345678 << 0x8) == 0x1234567800))
231−assert((0x12345678 << - (0x4 == 0x1234567)))
231+assert((0x12345678 << (- (0x4 == 0x1234567))))
232−assert((0x12345678 << - (0x8 == 0x123456)))
232+assert((0x12345678 << (- (0x8 == 0x123456))))
233assert(((0x12345678 << 0x20) == 0x1234567800000000))
233assert(((0x12345678 << 0x20) == 0x1234567800000000))
234−assert((0x12345678 << - (0x20 == 0x0)))
234+assert((0x12345678 << (- (0x20 == 0x0))))
235assert(((0x12345678 >> 0x4) == 0x1234567))
235assert(((0x12345678 >> 0x4) == 0x1234567))
236assert(((0x12345678 >> 0x8) == 0x123456))
236assert(((0x12345678 >> 0x8) == 0x123456))
237assert(((0x12345678 >> 0x20) == 0x0))
237assert(((0x12345678 >> 0x20) == 0x0))
238−assert((0x12345678 >> - (0x20 == 0x1234567800000000)))
238+assert((0x12345678 >> (- (0x20 == 0x1234567800000000))))
239print("\u{2b}")
239print("\u{2b}")
240local c = {0x0,0x1,0x2,0x3,0xa,0x80000000,0xaaaaaaaa,0x55555555,0xffffffff,0x7fffffff}
240local c = {0x0,0x1,0x2,0x3,0xa,0x80000000,0xaaaaaaaa,0x55555555,0xffffffff,0x7fffffff}
241for _,b in pairs(c)
241for _,b in pairs(c)
@@ -245,14 +245,14 @@ assert((bit32.band(b,b) == b))
245assert((bit32.band(b,b,b,b) == b))
245assert((bit32.band(b,b,b,b) == b))
246assert((bit32.btest(b,b) == (b ~= 0x0)))
246assert((bit32.btest(b,b) == (b ~= 0x0)))
247assert((bit32.band(b,b,b) == b))
247assert((bit32.band(b,b,b) == b))
248−assert((bit32.band(b,b,b,~ b) == 0x0))
248+assert((bit32.band(b,b,b,(~ b)) == 0x0))
249assert((bit32.btest(b,b,b) == (b ~= 0x0)))
249assert((bit32.btest(b,b,b) == (b ~= 0x0)))
250assert((bit32.band(b,bit32.bnot(b)) == 0x0))
250assert((bit32.band(b,bit32.bnot(b)) == 0x0))
251assert((bit32.bor(b,bit32.bnot(b)) == bit32.bnot(0x0)))
251assert((bit32.bor(b,bit32.bnot(b)) == bit32.bnot(0x0)))
252assert((bit32.bor(b) == b))
252assert((bit32.bor(b) == b))
253assert((bit32.bor(b,b) == b))
253assert((bit32.bor(b,b) == b))
254assert((bit32.bor(b,b,b) == b))
254assert((bit32.bor(b,b,b) == b))
255−assert((bit32.bor(b,b,0x0,~ b) == 0xffffffff))
255+assert((bit32.bor(b,b,0x0,(~ b)) == 0xffffffff))
256assert((bit32.bxor(b) == b))
256assert((bit32.bxor(b) == b))
257assert((bit32.bxor(b,b) == 0x0))
257assert((bit32.bxor(b,b) == 0x0))
258assert((bit32.bxor(b,b,b) == b))
258assert((bit32.bxor(b,b,b) == b))
@@ -263,24 +263,24 @@ assert((bit32.bnot(bit32.bnot(b)) == b))
263assert((bit32.bnot(b) == (((0x1 << 0x20) - 0x1) - b)))
263assert((bit32.bnot(b) == (((0x1 << 0x20) - 0x1) - b)))
264assert((bit32.lrotate(b,0x20) == b))
264assert((bit32.lrotate(b,0x20) == b))
265assert((bit32.rrotate(b,0x20) == b))
265assert((bit32.rrotate(b,0x20) == b))
266−assert((bit32.lshift(bit32.lshift(b,- 0x4),0x4) == bit32.band(b,bit32.bnot(0xf))))
266+assert((bit32.lshift(bit32.lshift(b,(- 0x4)),0x4) == bit32.band(b,bit32.bnot(0xf))))
267−assert((bit32.rshift(bit32.rshift(b,0x4),- 0x4) == bit32.band(b,bit32.bnot(0xf))))
267+assert((bit32.rshift(bit32.rshift(b,0x4),(- 0x4)) == bit32.band(b,bit32.bnot(0xf))))
268end
268end
269c={0x0,0x1,0x2,0x3,0xa,0x800000,0xaaaaaa,0x555555,0xffffff,0x7fffff}
269c={0x0,0x1,0x2,0x3,0xa,0x800000,0xaaaaaa,0x555555,0xffffff,0x7fffff}
270for _,b in pairs(c)
270for _,b in pairs(c)
271do
271do
272−for i = - 0x28, 0x28
272+for i = (- 0x28), 0x28
273do
273do
274local x = bit32.lshift(b,i)
274local x = bit32.lshift(b,i)
275local y = math.floor(math.fmod((b * (2.0 ^ i)),(2.0 ^ 0x20)))
275local y = math.floor(math.fmod((b * (2.0 ^ i)),(2.0 ^ 0x20)))
276assert((math.fmod((x - y),(2.0 ^ 0x20)) == 0x0))
276assert((math.fmod((x - y),(2.0 ^ 0x20)) == 0x0))
277end
277end
278end
278end
279−assert(not pcall(bit32.band,{}))
279+assert((not pcall(bit32.band,{})))
280−assert(not pcall(bit32.bnot,"\u{61}"))
280+assert((not pcall(bit32.bnot,"\u{61}")))
281−assert(not pcall(bit32.lshift,0x2d))
281+assert((not pcall(bit32.lshift,0x2d)))
282−assert(not pcall(bit32.lshift,0x2d,print))
282+assert((not pcall(bit32.lshift,0x2d,print)))
283−assert(not pcall(bit32.rshift,0x2d,print))
283+assert((not pcall(bit32.rshift,0x2d,print)))
284print("\u{2b}")
284print("\u{2b}")
285assert((bit32.extract(0x12345678,0x0,0x4) == 0x8))
285assert((bit32.extract(0x12345678,0x0,0x4) == 0x8))
286assert((bit32.extract(0x12345678,0x4,0x4) == 0x7))
286assert((bit32.extract(0x12345678,0x4,0x4) == 0x7))
@@ -288,22 +288,22 @@ assert((bit32.extract(0xa0001111,0x1c,0x4) == 0xa))
288assert((bit32.extract(0xa0001111,0x1f,0x1) == 0x1))
288assert((bit32.extract(0xa0001111,0x1f,0x1) == 0x1))
289assert((bit32.extract(0x50000111,0x1f,0x1) == 0x0))
289assert((bit32.extract(0x50000111,0x1f,0x1) == 0x0))
290assert((bit32.extract(0xf2345679,0x0,0x20) == 0xf2345679))
290assert((bit32.extract(0xf2345679,0x0,0x20) == 0xf2345679))
291−assert(not pcall(bit32.extract,0x0,- 0x1))
291+assert((not pcall(bit32.extract,0x0,(- 0x1))))
292−assert(not pcall(bit32.extract,0x0,0x20))
292+assert((not pcall(bit32.extract,0x0,0x20)))
293−assert(not pcall(bit32.extract,0x0,0x0,0x21))
293+assert((not pcall(bit32.extract,0x0,0x0,0x21)))
294−assert(not pcall(bit32.extract,0x0,0x1f,0x2))
294+assert((not pcall(bit32.extract,0x0,0x1f,0x2)))
295assert((bit32.replace(0x12345678,0x5,0x1c,0x4) == 0x52345678))
295assert((bit32.replace(0x12345678,0x5,0x1c,0x4) == 0x52345678))
296assert((bit32.replace(0x12345678,0x87654321,0x0,0x20) == 0x87654321))
296assert((bit32.replace(0x12345678,0x87654321,0x0,0x20) == 0x87654321))
297assert((bit32.replace(0x0,0x1,0x2) == (0x2 ^ 0x2)))
297assert((bit32.replace(0x0,0x1,0x2) == (0x2 ^ 0x2)))
298−assert((bit32.replace(0x0,- 0x1,0x4) == (0x2 ^ 0x4)))
298+assert((bit32.replace(0x0,(- 0x1),0x4) == (0x2 ^ 0x4)))
299−assert((bit32.replace(- 0x1,0x0,0x1f) == ((0x1 << 0x1f) - 0x1)))
299+assert((bit32.replace((- 0x1),0x0,0x1f) == ((0x1 << 0x1f) - 0x1)))
300−assert((bit32.replace(- 0x1,0x0,0x1,0x2) == ((0x1 << 0x20) - 0x7)))
300+assert((bit32.replace((- 0x1),0x0,0x1,0x2) == ((0x1 << 0x20) - 0x7)))
301assert((bit32.bor(3.0) == 0x3))
301assert((bit32.bor(3.0) == 0x3))
302−assert((bit32.bor(- 4.0) == 0xfffffffc))
302+assert((bit32.bor((- 4.0)) == 0xfffffffc))
303if (((2.0 ^ 0x32) < ((2.0 ^ 0x32) + 1.0)) and ((2.0 ^ 0x32) < (- (0x1 >> 0x1)))) then
303if (((2.0 ^ 0x32) < ((2.0 ^ 0x32) + 1.0)) and ((2.0 ^ 0x32) < (- (0x1 >> 0x1)))) then
304assert((bit32.bor(((2.0 ^ 0x20) - 5.0)) == 0xfffffffb))
304assert((bit32.bor(((2.0 ^ 0x20) - 5.0)) == 0xfffffffb))
305−assert((bit32.bor(- ((2.0 ^ 0x20) - 6.0)) == 0xfffffffa))
305+assert((bit32.bor((- ((2.0 ^ 0x20) - 6.0))) == 0xfffffffa))
306assert((bit32.bor(((2.0 ^ 0x30) - 5.0)) == 0xfffffffb))
306assert((bit32.bor(((2.0 ^ 0x30) - 5.0)) == 0xfffffffb))
307−assert((bit32.bor(- ((2.0 ^ 0x30) - 6.0)) == 0xfffffffa))
307+assert((bit32.bor((- ((2.0 ^ 0x30) - 6.0))) == 0xfffffffa))
308end
308end
309print("\u{4f}\u{4b}")
309print("\u{4f}\u{4b}")
desk/res/lua/cycled/bwcoercion.lua+2−2
@@ -6,7 +6,7 @@ _ENV=nil
6local function toint
6local function toint
7(x)
7(x)
8x=tonumber(x)
8x=tonumber(x)
9−if not x then
9+if (not x) then
10return false
10return false
11end
11end
12return tointeger(x)
12return tointeger(x)
@@ -55,5 +55,5 @@ return ((y and (x >> y)) or x)
55end
55end
56smt.__bnot=function (x)
56smt.__bnot=function (x)
57local x,y = checkargs(x,x,"\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}")
57local x,y = checkargs(x,x,"\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}")
58−return (y and ~ (x or x))
58+return (y and (~ (x or x)))
59end
59end
desk/res/lua/cycled/calls.lua+37−37
@@ -2,14 +2,14 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\
2local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
2local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3assert((type((0x1 < 0x2)) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}"))
3assert((type((0x1 < 0x2)) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}"))
4assert(((type(true) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}") and (type(false) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")))
4assert(((type(true) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}") and (type(false) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")))
5−assert((((((type(nil) == "\u{6e}\u{69}\u{6c}") and (type(- 0x3) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and (type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
5+assert((((((type(nil) == "\u{6e}\u{69}\u{6c}") and (type((- 0x3)) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and (type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
6assert((type(assert) == type(print)))
6assert((type(assert) == type(print)))
7local function f
7local function f
8(x)
8(x)
9return a:x(x)
9return a:x(x)
10end
10end
11assert((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
11assert((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
12−assert(not pcall(type))
12+assert((not pcall(type)))
13fact=false
13fact=false
14do
14do
15local res = 0x1
15local res = 0x1
@@ -34,11 +34,11 @@ function a.y(x)
34return (x + self)
34return (x + self)
35end
35end
36assert(((a:x(0x1) + 0xa) == a.y(0x1)))
36assert(((a:x(0x1) + 0xa) == a.y(0x1)))
37−a.t={["\u{69}"] = - 0x64}
37+a.t={["\u{69}"] = (- 0x64)}
38a["\u{74}"].x=function (self,a,b)
38a["\u{74}"].x=function (self,a,b)
39return ((self.i + a) + b)
39return ((self.i + a) + b)
40end
40end
41−assert((a.t:x(0x2,0x3) == - 0x5f))
41+assert((a.t:x(0x2,0x3) == (- 0x5f)))
42do
42do
43local a = {["\u{78}"] = 0x0}
43local a = {["\u{78}"] = 0x0}
44function a:add(x)
44function a:add(x)
@@ -102,7 +102,7 @@ do
102local function dummy
102local function dummy
103(n)
103(n)
104if (n > 0x0) then
104if (n > 0x0) then
105−assert(not pcall(err_on_n,n))
105+assert((not pcall(err_on_n,n)))
106dummy((n - 0x1))
106dummy((n - 0x1))
107end
107end
108end
108end
@@ -145,8 +145,8 @@ local function foo1
145(x)
145(x)
146return foo(0xa,x,(x + 0x1))
146return foo(0xa,x,(x + 0x1))
147end
147end
148−local a,b,c = foo1(- 0x2)
148+local a,b,c = foo1((- 0x2))
149−assert(((a == 0xa) and (b == - (0x2 and (c == - 0x1)))))
149+assert(((a == 0xa) and (b == (- (0x2 and (c == (- 0x1)))))))
150local t = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
150local t = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
151local function foo2
151local function foo2
152(x)
152(x)
@@ -172,13 +172,13 @@ local function foo1
172return foo(...)
172return foo(...)
173end
173end
174local a,b,c = foo1()
174local a,b,c = foo1()
175−assert((((X == nil) and (Y == nil)) and # (A == 0x0)))
175+assert((((X == nil) and (Y == nil)) and (# (A == 0x0))))
176a,b,c=foo1(0xa)
176a,b,c=foo1(0xa)
177−assert((((X == 0xa) and (Y == nil)) and # (A == 0x0)))
177+assert((((X == 0xa) and (Y == nil)) and (# (A == 0x0))))
178a,b,c=foo1(0xa,0x14)
178a,b,c=foo1(0xa,0x14)
179−assert((((X == 0xa) and (Y == 0x14)) and # (A == 0x0)))
179+assert((((X == 0xa) and (Y == 0x14)) and (# (A == 0x0))))
180a,b,c=foo1(0xa,0x14,0x1e)
180a,b,c=foo1(0xa,0x14,0x1e)
181−assert((((X == 0xa) and (Y == 0x14)) and # ((A == 0x1) and (A[0x1] == 0x1e))))
181+assert((((X == 0xa) and (Y == 0x14)) and (# ((A == 0x1) and (A[0x1] == 0x1e)))))
182end
182end
183do
183do
184local function loop
184local function loop
@@ -186,7 +186,7 @@ local function loop
186assert(pcall(loop))
186assert(pcall(loop))
187end
187end
188local err,msg = xpcall(loop,loop)
188local err,msg = xpcall(loop,loop)
189−assert(not (err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}")))
189+assert((not (err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}"))))
190end
190end
191do
191do
192local n = 0x2710
192local n = 0x2710
@@ -267,20 +267,20 @@ print("\u{2b}")
267local function unlpack
267local function unlpack
268(t,i)
268(t,i)
269i=(i or 0x1)
269i=(i or 0x1)
270−if (i <= # t) then
270+if (i <= (# t)) then
271return t[i],unlpack(t,(i + 0x1))
271return t[i],unlpack(t,(i + 0x1))
272end
272end
273end
273end
274local function equaltab
274local function equaltab
275(t1,t2)
275(t1,t2)
276−assert(# (t1 == # t2))
276+assert((# (t1 == (# t2))))
277−for i = 0x1, # t1
277+for i = 0x1, (# t1)
278do
278do
279assert((t1[i] == t2[i]))
279assert((t1[i] == t2[i]))
280end
280end
281end
281end
282local pack = function (...)
282local pack = function (...)
283−return (table.pack(...))
283+return table.pack(...)
284end
284end
285local function f
285local function f
286()
286()
@@ -294,12 +294,12 @@ local a,b,c,d = unlpack({0x1,0x2,0x3})
294assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
294assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
295a={0x1,0x2,0x3,0x4,false,0xa,"\u{61}\u{6c}\u{6f}",false,assert}
295a={0x1,0x2,0x3,0x4,false,0xa,"\u{61}\u{6c}\u{6f}",false,assert}
296equaltab(pack(unlpack(a)),a)
296equaltab(pack(unlpack(a)),a)
297−equaltab(pack(unlpack(a),- 0x1),{0x1,- 0x1})
297+equaltab(pack(unlpack(a),(- 0x1)),{0x1,(- 0x1)})
298a,b,c,d=ret2(f()),ret2(f())
298a,b,c,d=ret2(f()),ret2(f())
299assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
299assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
300a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
300a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
301assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
301assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
302−a,b,c,d=unlpack(pack(ret2(f()),(ret2(f()))))
302+a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
303assert(((((a == 0x1) and (b == 0x1)) and (c == nil)) and (d == nil)))
303assert(((((a == 0x1) and (b == 0x1)) and (c == nil)) and (d == nil)))
304a=ret2({unlpack({0x1,0x2,0x3}),unlpack({0x3,0x2,0x1}),unlpack({"\u{61}","\u{62}"})})
304a=ret2({unlpack({0x1,0x2,0x3}),unlpack({0x3,0x2,0x1}),unlpack({"\u{61}","\u{62}"})})
305assert(((((a[0x1] == 0x1) and (a[0x2] == 0x3)) and (a[0x3] == "\u{61}")) and (a[0x4] == "\u{62}")))
305assert(((((a[0x1] == 0x1) and (a[0x2] == 0x3)) and (a[0x3] == "\u{61}")) and (a[0x4] == "\u{62}")))
@@ -321,7 +321,7 @@ end
321end
321end
322local function cannotload
322local function cannotload
323(msg,a,b)
323(msg,a,b)
324−assert(not (a and string.find(b,msg)))
324+assert((not (a and string.find(b,msg))))
325end
325end
326a=assert(load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{74}",_G))
326a=assert(load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{74}",_G))
327assert(((a() == "\u{0}") and (_G.x == 0x21)))
327assert(((a() == "\u{0}") and (_G.x == 0x21)))
@@ -332,9 +332,9 @@ a=assert(load(function ()
332return nil
332return nil
333end))
333end))
334a()
334a()
335−assert(not load(function ()
335+assert((not load(function ()
336return true
336return true
337−end))
337+end)))
338local t = {nil,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{33}"}
338local t = {nil,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{33}"}
339f,msg=load(function ()
339f,msg=load(function ()
340return table.remove(t,0x1)
340return table.remove(t,0x1)
@@ -357,7 +357,7 @@ assert(((a() == 0x1) and (_G.x == 0x1)))
357cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),nil,"\u{74}"))
357cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),nil,"\u{74}"))
358cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,nil,"\u{74}"))
358cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,nil,"\u{74}"))
359_G.x=nil
359_G.x=nil
360−assert(not pcall(string.dump,print))
360+assert((not pcall(string.dump,print)))
361cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load(read1("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}")))
361cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load(read1("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}")))
362cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}"))
362cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}"))
363cannotload("\u{68}\u{68}\u{69}",load(function ()
363cannotload("\u{68}\u{68}\u{69}",load(function ()
@@ -399,7 +399,7 @@ assert((x() == nil))
399assert((debug.setupvalue(x,0x1,"\u{68}\u{69}") == "\u{61}"))
399assert((debug.setupvalue(x,0x1,"\u{68}\u{69}") == "\u{61}"))
400assert((x() == "\u{68}\u{69}"))
400assert((x() == "\u{68}\u{69}"))
401assert((debug.setupvalue(x,0x2,0xd) == "\u{62}"))
401assert((debug.setupvalue(x,0x2,0xd) == "\u{62}"))
402−assert(not debug.setupvalue(x,0x3,0xa))
402+assert((not debug.setupvalue(x,0x3,0xa)))
403x("\u{73}\u{65}\u{74}")
403x("\u{73}\u{65}\u{74}")
404assert((x() == 0x17))
404assert((x() == 0x17))
405x("\u{73}\u{65}\u{74}")
405x("\u{73}\u{65}\u{74}")
@@ -409,22 +409,22 @@ local nup = 0xc8
409local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}"}
409local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}"}
410for i = 0x2, nup
410for i = 0x2, nup
411do
411do
412−prog[# (prog + 0x1)]=("\u{2c}\u{20}\u{61}" .. i)
412+prog[(# (prog + 0x1))]=("\u{2c}\u{20}\u{61}" .. i)
413end
413end
414−prog[# (prog + 0x1)]="\u{20}\u{3d}\u{20}\u{31}"
414+prog[(# (prog + 0x1))]="\u{20}\u{3d}\u{20}\u{31}"
415for i = 0x2, nup
415for i = 0x2, nup
416do
416do
417−prog[# (prog + 0x1)]=("\u{2c}\u{20}" .. i)
417+prog[(# (prog + 0x1))]=("\u{2c}\u{20}" .. i)
418end
418end
419local sum = 0x1
419local sum = 0x1
420−prog[# (prog + 0x1)]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
420+prog[(# (prog + 0x1))]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
421for i = 0x2, nup
421for i = 0x2, nup
422do
422do
423−prog[# (prog + 0x1)]=("\u{20}\u{2b}\u{20}\u{61}" .. i)
423+prog[(# (prog + 0x1))]=("\u{20}\u{2b}\u{20}\u{61}" .. i)
424;
424;
425sum=(sum + i)
425sum=(sum + i)
426end
426end
427−prog[# (prog + 0x1)]="\u{20}\u{65}\u{6e}\u{64}"
427+prog[(# (prog + 0x1))]="\u{20}\u{65}\u{6e}\u{64}"
428prog=table.concat(prog)
428prog=table.concat(prog)
429local f = assert(load(prog))()
429local f = assert(load(prog))()
430assert((f() == sum))
430assert((f() == sum))
@@ -473,19 +473,19 @@ local s2 = "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{6e}\u
473return (a + (b * 0x3))
473return (a + (b * 0x3))
474end)
474end)
475assert((assert(load(c))() == 0xa))
475assert((assert(load(c))() == 0xa))
476−assert((string.sub(c,0x1,# header) == header))
476+assert((string.sub(c,0x1,(# header)) == header))
477−local ci,cn = string.unpack("\u{6a}\u{6e}",c,# (header + 0x1))
477+local ci,cn = string.unpack("\u{6a}\u{6e}",c,(# (header + 0x1)))
478assert(((ci == 0x5678) and (cn == 370.5)))
478assert(((ci == 0x5678) and (cn == 370.5)))
479−for i = 0x1, # header
479+for i = 0x1, (# header)
480do
480do
481−local s = (string.sub(c,0x1,(i - 0x1)) .. (string.char((string.byte(string.sub(c,i,i)) + 0x1)) .. string.sub(c,(i + 0x1),- 0x1)))
481+local s = (string.sub(c,0x1,(i - 0x1)) .. (string.char((string.byte(string.sub(c,i,i)) + 0x1)) .. string.sub(c,(i + 0x1),(- 0x1))))
482−assert(# (s == # c))
482+assert((# (s == (# c))))
483−assert(not load(s))
483+assert((not load(s)))
484end
484end
485−for i = 0x1, # (c - 0x1)
485+for i = 0x1, (# (c - 0x1))
486do
486do
487local st,msg = load(string.sub(c,0x1,i))
487local st,msg = load(string.sub(c,0x1,i))
488−assert(not (st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}")))
488+assert((not (st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}"))))
489end
489end
490end
490end
491print("\u{4f}\u{4b}")
491print("\u{4f}\u{4b}")
desk/res/lua/cycled/closure.lua+10−10
@@ -87,7 +87,7 @@ assert((a[0x3].get() == 0x3))
87assert((a[0x2].get() == "\u{61}"))
87assert((a[0x2].get() == "\u{61}"))
88a={}
88a={}
89local t = {"\u{61}","\u{62}"}
89local t = {"\u{61}","\u{62}"}
90−for i = 0x1, # t
90+for i = 0x1, (# t)
91do
91do
92local k = t[i]
92local k = t[i]
93a[i]={["\u{73}\u{65}\u{74}"] = function (x,y)
93a[i]={["\u{73}\u{65}\u{74}"] = function (x,y)
@@ -118,7 +118,7 @@ end
118break
118break
119end
119end
120assert((f() == 0x1))
120assert((f() == 0x1))
121−for k = 0x1, # t
121+for k = 0x1, (# t)
122do
122do
123local v = t[k]
123local v = t[k]
124f=function ()
124f=function ()
@@ -132,7 +132,7 @@ local b
132function f(x)
132function f(x)
133local first = 0x1
133local first = 0x1
134while 0x1 do
134while 0x1 do
135−if ((x == 0x3) and not first) then
135+if ((x == 0x3) and (not first)) then
136return
136return
137end
137end
138local a = "\u{78}\u{75}\u{78}\u{75}"
138local a = "\u{78}\u{75}\u{78}\u{75}"
@@ -303,7 +303,7 @@ end
303end
303end
304assert(debug.upvalueid(foo1,0x1))
304assert(debug.upvalueid(foo1,0x1))
305assert(debug.upvalueid(foo1,0x2))
305assert(debug.upvalueid(foo1,0x2))
306−assert(not debug.upvalueid(foo1,0x3))
306+assert((not debug.upvalueid(foo1,0x3)))
307assert((debug.upvalueid(foo1,0x1) == debug.upvalueid(foo2,0x2)))
307assert((debug.upvalueid(foo1,0x1) == debug.upvalueid(foo2,0x2)))
308assert((debug.upvalueid(foo1,0x2) == debug.upvalueid(foo2,0x1)))
308assert((debug.upvalueid(foo1,0x2) == debug.upvalueid(foo2,0x1)))
309assert(debug.upvalueid(foo3,0x1))
309assert(debug.upvalueid(foo3,0x1))
@@ -318,10 +318,10 @@ debug.upvaluejoin(foo3,0x2,foo2,0x1)
318assert((foo3() == (0xa + 0x5)))
318assert((foo3() == (0xa + 0x5)))
319debug.upvaluejoin(foo3,0x2,foo2,0x2)
319debug.upvaluejoin(foo3,0x2,foo2,0x2)
320assert((foo3() == (0xa + 0x3)))
320assert((foo3() == (0xa + 0x3)))
321−assert(not pcall(debug.upvaluejoin,foo1,0x3,foo2,0x1))
321+assert((not pcall(debug.upvaluejoin,foo1,0x3,foo2,0x1)))
322−assert(not pcall(debug.upvaluejoin,foo1,0x1,foo2,0x3))
322+assert((not pcall(debug.upvaluejoin,foo1,0x1,foo2,0x3)))
323−assert(not pcall(debug.upvaluejoin,foo1,0x0,foo2,0x1))
323+assert((not pcall(debug.upvaluejoin,foo1,0x0,foo2,0x1)))
324−assert(not pcall(debug.upvaluejoin,print,0x1,foo2,0x1))
324+assert((not pcall(debug.upvaluejoin,print,0x1,foo2,0x1)))
325−assert(not pcall(debug.upvaluejoin,{},0x1,foo2,0x1))
325+assert((not pcall(debug.upvaluejoin,{},0x1,foo2,0x1)))
326−assert(not pcall(debug.upvaluejoin,foo1,0x1,print,0x1))
326+assert((not pcall(debug.upvaluejoin,foo1,0x1,print,0x1)))
327print("\u{4f}\u{4b}")
327print("\u{4f}\u{4b}")
desk/res/lua/cycled/code.lua+69−69
@@ -28,8 +28,8 @@ end
28local function checkKlist
28local function checkKlist
29(func,list)
29(func,list)
30local k = T.listk(func)
30local k = T.listk(func)
31−assert(# (k == # list))
31+assert((# (k == (# list))))
32−for i = 0x1, # k
32+for i = 0x1, (# k)
33do
33do
34assert(((k[i] == list[i]) and (math.type(k[i]) == math.type(list[i]))))
34assert(((k[i] == list[i]) and (math.type(k[i]) == math.type(list[i]))))
35end
35end
@@ -43,20 +43,20 @@ a=0x0
43;
43;
44a=0.0
44a=0.0
45;
45;
46−a=- (0x7 + 0x7)
46+a=(- (0x7 + 0x7))
47a=(k3_78 / 0x4)
47a=(k3_78 / 0x4)
48;
48;
49a=k3_78_4
49a=k3_78_4
50−a=- (k3_78 / 0x4)
50+a=(- (k3_78 / 0x4))
51;
51;
52a=(k3_78 / 0x4)
52a=(k3_78 / 0x4)
53;
53;
54−a=- (3.78 / 0x4)
54+a=(- (3.78 / 0x4))
55−a=- (3.79 / 0x4)
55+a=(- (3.79 / 0x4))
56;
56;
57a=0.0
57a=0.0
58;
58;
59−a=- 0x0
59+a=(- 0x0)
60;
60;
61a=k3
61a=k3
62;
62;
@@ -66,18 +66,18 @@ a=0x3
66;
66;
67a=3.0
67a=3.0
68end
68end
69−checkKlist(foo,{(3.78 / 0x4),- (3.78 / 0x4),- (3.79 / 0x4)})
69+checkKlist(foo,{(3.78 / 0x4),(- (3.78 / 0x4)),(- (3.79 / 0x4))})
70foo=function (f,a)
70foo=function (f,a)
71f((0x64 * 0x3e8))
71f((0x64 * 0x3e8))
72f((100.0 * 0x3e8))
72f((100.0 * 0x3e8))
73−f(- (0x64 * 0x3e8))
73+f((- (0x64 * 0x3e8)))
74−f(- (0x64 * 1e3))
74+f((- (0x64 * 1e3)))
75f(0x186a0)
75f(0x186a0)
76f(1e5)
76f(1e5)
77−f(- 0x186a0)
77+f((- 0x186a0))
78−f(- 1e5)
78+f((- 1e5))
79end
79end
80−checkKlist(foo,{0x186a0,1e5,- 0x186a0,- 1e5})
80+checkKlist(foo,{0x186a0,1e5,(- 0x186a0),(- 1e5)})
81foo=function (t,a)
81foo=function (t,a)
82t[a]=0x1
82t[a]=0x1
83;
83;
@@ -106,12 +106,12 @@ local function check
106(f, ...)
106(f, ...)
107local arg = {...}
107local arg = {...}
108local c = T.listcode(f)
108local c = T.listcode(f)
109−for i = 0x1, # arg
109+for i = 0x1, (# arg)
110do
110do
111local opcode = string.match(c[i],"\u{25}\u{75}\u{25}\u{77}\u{2b}")
111local opcode = string.match(c[i],"\u{25}\u{75}\u{25}\u{77}\u{2b}")
112assert((arg[i] == opcode))
112assert((arg[i] == opcode))
113end
113end
114−assert((c[# (arg + 0x2)] == undef))
114+assert((c[(# (arg + 0x2))] == undef))
115end
115end
116local function checkR
116local function checkR
117(f,p,r, ...)
117(f,p,r, ...)
@@ -123,8 +123,8 @@ local function checkequal
123(a,b)
123(a,b)
124a=T.listcode(a)
124a=T.listcode(a)
125b=T.listcode(b)
125b=T.listcode(b)
126−assert(# (a == # b))
126+assert((# (a == (# b))))
127−for i = 0x1, # a
127+for i = 0x1, (# a)
128do
128do
129a[i]=string.gsub(a[i],"\u{25}\u{62}\u{28}\u{29}","")
129a[i]=string.gsub(a[i],"\u{25}\u{62}\u{28}\u{29}","")
130b[i]=string.gsub(b[i],"\u{25}\u{62}\u{28}\u{29}","")
130b[i]=string.gsub(b[i],"\u{25}\u{62}\u{28}\u{29}","")
@@ -187,12 +187,12 @@ return a
187end,"\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
187end,"\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
188check(function ()
188check(function ()
189while kTrue do
189while kTrue do
190−local a = - 0x1
190+local a = (- 0x1)
191end
191end
192end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
192end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
193check(function ()
193check(function ()
194while 0x1 do
194while 0x1 do
195−local a = - 0x1
195+local a = (- 0x1)
196end
196end
197end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
197end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
198check(function ()
198check(function ()
@@ -204,21 +204,21 @@ check(function (a,b,c,d)
204return (a .. (b .. (c .. d)))
204return (a .. (b .. (c .. d)))
205end,"\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{43}\u{4f}\u{4e}\u{43}\u{41}\u{54}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
205end,"\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{43}\u{4f}\u{4e}\u{43}\u{41}\u{54}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
206check(function ()
206check(function ()
207−return not not nil
207+return (not (not nil))
208end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
208end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
209check(function ()
209check(function ()
210−return not not kFalse
210+return (not (not kFalse))
211end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
211end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
212check(function ()
212check(function ()
213−return not not true
213+return (not (not true))
214end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
214end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
215check(function ()
215check(function ()
216−return not not k3
216+return (not (not k3))
217end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
217end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
218check(function ()
218check(function ()
219local a,b,c,d
219local a,b,c,d
220a=(b * a)
220a=(b * a)
221−c.x,a[b]=- (((a + (d / b)) - a[b]) ^ a.x),b
221+c.x,a[b]=(- (((a + (d / b)) - a[b]) ^ a.x)),b
222end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{4d}\u{55}\u{4c}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{44}\u{49}\u{56}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{41}\u{44}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{55}\u{42}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{50}\u{4f}\u{57}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{55}\u{4e}\u{4d}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
222end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{4d}\u{55}\u{4c}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{44}\u{49}\u{56}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{41}\u{44}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{55}\u{42}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{50}\u{4f}\u{57}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{55}\u{4e}\u{4d}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
223check(function ()
223check(function ()
224local a,b
224local a,b
@@ -249,10 +249,10 @@ return 0x2
249end
249end
250end,0x1,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
250end,0x1,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
251checkR(function (a)
251checkR(function (a)
252−if - (4.0 == a) then
252+if (- (4.0 == a)) then
253return 0x2
253return 0x2
254end
254end
255−end,- 0x4,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
255+end,(- 0x4),0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
256checkR(function (a)
256checkR(function (a)
257if (a == "\u{68}\u{69}") then
257if (a == "\u{68}\u{69}") then
258return 0x2
258return 0x2
@@ -264,25 +264,25 @@ return 0x2
264end
264end
265end,0x1,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
265end,0x1,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
266checkR(function (a)
266checkR(function (a)
267−if - (0x2710 == a) then
267+if (- (0x2710 == a)) then
268return 0x2
268return 0x2
269end
269end
270−end,- 0x2710,0x2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
270+end,(- 0x2710),0x2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
271checkR(function (a)
271checkR(function (a)
272−if - (0xa <= a) then
272+if (- (0xa <= a)) then
273return 0x2
273return 0x2
274end
274end
275−end,- 0xa,0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
275+end,(- 0xa),0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
276checkR(function (a)
276checkR(function (a)
277if (128.0 > a) then
277if (128.0 > a) then
278return 0x2
278return 0x2
279end
279end
280end,0x81,nil,"\u{4c}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
280end,0x81,nil,"\u{4c}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
281checkR(function (a)
281checkR(function (a)
282−if - (127.0 < a) then
282+if (- (127.0 < a)) then
283return 0x2
283return 0x2
284end
284end
285−end,- 0x7f,nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
285+end,(- 0x7f),nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
286checkR(function (a)
286checkR(function (a)
287if (0xa < a) then
287if (0xa < a) then
288return 0x2
288return 0x2
@@ -333,40 +333,40 @@ checkI(function ()
333return k0
333return k0
334end,0x0)
334end,0x0)
335checkI(function ()
335checkI(function ()
336−return - (k0 // 0x1)
336+return (- (k0 // 0x1))
337end,0x0)
337end,0x0)
338checkK(function ()
338checkK(function ()
339−return (0x3 ^ - 0x1)
339+return (0x3 ^ (- 0x1))
340end,(0x1 / 0x3))
340end,(0x1 / 0x3))
341checkK(function ()
341checkK(function ()
342return ((0x1 + 0x1) ^ (0x32 + 0x32))
342return ((0x1 + 0x1) ^ (0x32 + 0x32))
343end,(0x2 ^ 0x64))
343end,(0x2 ^ 0x64))
344checkK(function ()
344checkK(function ()
345return ((- 0x2) ^ (0x1f - 0x2))
345return ((- 0x2) ^ (0x1f - 0x2))
346−end,- (0x20000000 + 0.0))
346+end,(- (0x20000000 + 0.0)))
347checkF(function ()
347checkF(function ()
348return ((- ((k3 ^ 0x0) + 0x5)) // 3.0)
348return ((- ((k3 ^ 0x0) + 0x5)) // 3.0)
349end,1.0)
349end,1.0)
350checkI(function ()
350checkI(function ()
351−return - (k3 % 0x5)
351+return (- (k3 % 0x5))
352end,0x2)
352end,0x2)
353checkF(function ()
353checkF(function ()
354−return - ((((((2.0 ^ 0x8) + - (- 0x1)) % 0x8) / 0x2) * 0x4) - 0x3)
354+return (- ((((((2.0 ^ 0x8) + (- (- 0x1))) % 0x8) / 0x2) * 0x4) - 0x3))
355−end,- 5.0)
355+end,(- 5.0))
356checkF(function ()
356checkF(function ()
357−return - ((((((0x2 ^ 0x8) + - (- 0x1)) % 0x8) // 0x2) * 0x4) - 0x3)
357+return (- ((((((0x2 ^ 0x8) + (- (- 0x1))) % 0x8) // 0x2) * 0x4) - 0x3))
358−end,- 7.0)
358+end,(- 7.0))
359checkI(function ()
359checkI(function ()
360return (240.0 | (204.0 ~ (0xaa & 0xfd)))
360return (240.0 | (204.0 ~ (0xaa & 0xfd)))
361end,0xf4)
361end,0xf4)
362checkI(function ()
362checkI(function ()
363−return ~ (~ (kFF0 | kFF0))
363+return (~ (~ (kFF0 | kFF0)))
364end,0x0)
364end,0x0)
365checkI(function ()
365checkI(function ()
366−return ~ ~ - 1024.0
366+return (~ (~ (- 1024.0)))
367−end,- 0x400)
367+end,(- 0x400))
368checkI(function ()
368checkI(function ()
369−return (((0x64 << k6) << - 0x4) >> 0x2)
369+return (((0x64 << k6) << (- 0x4)) >> 0x2)
370end,0x64)
370end,0x64)
371local a = 0x11
371local a = 0x11
372;
372;
@@ -376,8 +376,8 @@ checkI(function ()
376return border
376return border
377end,sbx)
377end,sbx)
378checkI(function ()
378checkI(function ()
379−return - border
379+return (- border)
380−end,- sbx)
380+end,(- sbx))
381checkI(function ()
381checkI(function ()
382return (border + 0x1)
382return (border + 0x1)
383end,(sbx + 0x1))
383end,(sbx + 0x1))
@@ -385,15 +385,15 @@ checkK(function ()
385return (border + 0x2)
385return (border + 0x2)
386end,(sbx + 0x2))
386end,(sbx + 0x2))
387checkK(function ()
387checkK(function ()
388−return - (border + 0x1)
388+return (- (border + 0x1))
389−end,- (sbx + 0x1))
389+end,(- (sbx + 0x1)))
390local border <const> = 65535.0
390local border <const> = 65535.0
391checkF(function ()
391checkF(function ()
392return border
392return border
393end,(sbx + 0.0))
393end,(sbx + 0.0))
394checkF(function ()
394checkF(function ()
395−return - border
395+return (- border)
396−end,- (sbx + 0.0))
396+end,(- (sbx + 0.0)))
397checkF(function ()
397checkF(function ()
398return (border + 0x1)
398return (border + 0x1)
399end,(sbx + 1.0))
399end,(sbx + 1.0))
@@ -401,25 +401,25 @@ checkK(function ()
401return (border + 0x2)
401return (border + 0x2)
402end,(sbx + 2.0))
402end,(sbx + 2.0))
403checkK(function ()
403checkK(function ()
404−return - (border + 0x1)
404+return (- (border + 0x1))
405−end,- (sbx + 1.0))
405+end,(- (sbx + 1.0)))
406checkR(function (x)
406checkR(function (x)
407return (x + k1)
407return (x + k1)
408end,0xa,0xb,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
408end,0xa,0xb,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
409checkR(function (x)
409checkR(function (x)
410return (x - 0x7f)
410return (x - 0x7f)
411−end,0xa,- 0x75,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
411+end,0xa,(- 0x75),"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
412checkR(function (x)
412checkR(function (x)
413return (0x80 + x)
413return (0x80 + x)
414end,0.0,128.0,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
414end,0.0,128.0,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
415checkR(function (x)
415checkR(function (x)
416−return (x * - 0x7f)
416+return (x * (- 0x7f))
417−end,- 1.0,127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
417+end,(- 1.0),127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
418checkR(function (x)
418checkR(function (x)
419return (0x14 * x)
419return (0x14 * x)
420end,0x2,0x28,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
420end,0x2,0x28,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
421checkR(function (x)
421checkR(function (x)
422−return (x ^ - 0x2)
422+return (x ^ (- 0x2))
423end,0x2,0.25,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
423end,0x2,0.25,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
424checkR(function (x)
424checkR(function (x)
425return (x / 0x28)
425return (x / 0x28)
@@ -437,13 +437,13 @@ checkR(function (x)
437return (x << 0x7f)
437return (x << 0x7f)
438end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
438end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
439checkR(function (x)
439checkR(function (x)
440−return (x << - 0x7f)
440+return (x << (- 0x7f))
441end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
441end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
442checkR(function (x)
442checkR(function (x)
443return (x >> 0x80)
443return (x >> 0x80)
444end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
444end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
445checkR(function (x)
445checkR(function (x)
446−return (x >> - 0x7f)
446+return (x >> (- 0x7f))
447end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
447end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
448checkR(function (x)
448checkR(function (x)
449return (x & 0x1)
449return (x & 0x1)
@@ -452,14 +452,14 @@ checkR(function (x)
452return (0xa | x)
452return (0xa | x)
453end,0x1,0xb,"\u{42}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
453end,0x1,0xb,"\u{42}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
454checkR(function (x)
454checkR(function (x)
455−return - (0xa ~ x)
455+return (- (0xa ~ x))
456−end,- 0x1,0x9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
456+end,(- 0x1),0x9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
457checkR(function (x)
457checkR(function (x)
458return (x + 0.0)
458return (x + 0.0)
459end,0x1,1.0,"\u{41}\u{44}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
459end,0x1,1.0,"\u{41}\u{44}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
460checkR(function (x)
460checkR(function (x)
461−return (x * - 0x2710)
461+return (x * (- 0x2710))
462−end,0x2,- 0x4e20,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
462+end,0x2,(- 0x4e20),"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
463checkR(function (x)
463checkR(function (x)
464return (x ^ 0.5)
464return (x ^ 0.5)
465end,0x4,2.0,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
465end,0x4,2.0,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
@@ -473,7 +473,7 @@ checkR(function (x)
473return (x % (100.0 - 0xa))
473return (x % (100.0 - 0xa))
474end,0x5b,1.0,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
474end,0x5b,1.0,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
475check(function ()
475check(function ()
476−return - 0.0
476+return (- 0.0)
477end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
477end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
478check(function ()
478check(function ()
479return (k3 / 0x0)
479return (k3 / 0x0)
@@ -482,7 +482,7 @@ check(function ()
482return (0x0 % 0x0)
482return (0x0 % 0x0)
483end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
483end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
484check(function ()
484check(function ()
485−return - (0x4 // 0x0)
485+return (- (0x4 // 0x0))
486end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
486end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
487check(function (x)
487check(function (x)
488return (x >> 2.0)
488return (x >> 2.0)
@@ -494,7 +494,7 @@ check(function (x)
494return (x & 2.0)
494return (x & 2.0)
495end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{42}\u{41}\u{4e}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
495end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{42}\u{41}\u{4e}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
496check(function ()
496check(function ()
497−for i = - 0xa, 10.5
497+for i = (- 0xa), 10.5
498do
498do
499
499
500end
500end
@@ -506,7 +506,7 @@ do
506end
506end
507end,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{46}\u{4f}\u{52}\u{50}\u{52}\u{45}\u{50}","\u{46}\u{4f}\u{52}\u{4c}\u{4f}\u{4f}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
507end,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{46}\u{4f}\u{52}\u{50}\u{52}\u{45}\u{50}","\u{46}\u{4f}\u{52}\u{4c}\u{4f}\u{4f}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
508check(function ()
508check(function ()
509−return - nil
509+return (- nil)
510end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
510end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
511check(function ()
511check(function ()
512local a,b,c
512local a,b,c
@@ -527,13 +527,13 @@ end
527checkequal(function ()
527checkequal(function ()
528local a
528local a
529;
529;
530−if not (a or b) then
530+if (not (a or b)) then
531b=a
531b=a
532end
532end
533end,function ()
533end,function ()
534local a
534local a
535;
535;
536−if (not (a and not b)) then
536+if (not (a and (not b))) then
537b=a
537b=a
538end
538end
539end)
539end)
@@ -544,7 +544,7 @@ return ((0x0 <= a) and (a <= l))
544end,function (l)
544end,function (l)
545local a
545local a
546;
546;
547−return not (not ((a >= 0x0) or not (a <= l)))
547+return (not (not ((a >= 0x0) or (not (a <= l)))))
548end)
548end)
549check(function (a,b)
549check(function (a,b)
550while a do
550while a do
desk/res/lua/cycled/constructs.lua+22−22
@@ -32,31 +32,31 @@ assert((((0x2 ^ 0x3) ^ 0x2) == (0x2 ^ (0x3 ^ 0x2))))
32;
32;
33assert((((0x2 ^ 0x3) * 0x4) == ((0x2 ^ 0x3) * 0x4)))
33assert((((0x2 ^ 0x3) * 0x4) == ((0x2 ^ 0x3) * 0x4)))
34;
34;
35−assert((2.0 ^ - ((0x2 == (0x1 / 0x4)) and - (0x2 ^ - - (0x2 == - - - 0x4)))))
35+assert((2.0 ^ (- ((0x2 == (0x1 / 0x4)) and (- (0x2 ^ (- (- (0x2 == (- (- (- 0x4))))))))))))
36;
36;
37−assert(not ((nil and 0x2) and not ((0x2 > 0x3) or (0x3 < 0x2))))
37+assert((not ((nil and 0x2) and (not ((0x2 > 0x3) or (0x3 < 0x2))))))
38;
38;
39−assert(- (((0x3 - 0x1) - 0x5) == ((0x0 + 0x0) - 0x9)))
39+assert((- (((0x3 - 0x1) - 0x5) == ((0x0 + 0x0) - 0x9))))
40;
40;
41−assert(- ((0x2 ^ 0x2) == - ((0x4 and (((- 0x2) ^ 0x2) == 0x4)) and ((((0x2 * 0x2) - 0x3) - 0x1) == 0x0))))
41+assert((- ((0x2 ^ 0x2) == (- ((0x4 and (((- 0x2) ^ 0x2) == 0x4)) and ((((0x2 * 0x2) - 0x3) - 0x1) == 0x0))))))
42;
42;
43−assert(- (((0x3 % 0x5) == 0x2) and - ((0x3 + 0x5) == 0x2)))
43+assert((- (((0x3 % 0x5) == 0x2) and (- ((0x3 + 0x5) == 0x2)))))
44assert(((((0x2 * 0x1) + (0x3 / 0x3)) == 0x3) and (((0x1 + 0x2) .. (0x3 * 0x1)) == "\u{33}\u{33}")))
44assert(((((0x2 * 0x1) + (0x3 / 0x3)) == 0x3) and (((0x1 + 0x2) .. (0x3 * 0x1)) == "\u{33}\u{33}")))
45;
45;
46−assert(not (((0x2 + 0x1) > (0x3 * 0x1)) and (("\u{61}" .. "\u{62}") > "\u{61}")))
46+assert((not (((0x2 + 0x1) > (0x3 * 0x1)) and (("\u{61}" .. "\u{62}") > "\u{61}"))))
47;
47;
48assert(((0xf0 | (0xcc ~ (0xaa & 0xfd))) == 0xf4))
48assert(((0xf0 | (0xcc ~ (0xaa & 0xfd))) == 0xf4))
49assert(((((0xfd & 0xaa) ~ 0xcc) | 0xf0) == 0xf4))
49assert(((((0xfd & 0xaa) ~ 0xcc) | 0xf0) == 0xf4))
50assert(((0xf0 & (0xf + 0x1)) == 0x10))
50assert(((0xf0 & (0xf + 0x1)) == 0x10))
51assert(((((0x3 ^ 0x4) // (0x2 ^ 0x3)) // 0x5) == 0x2))
51assert(((((0x3 ^ 0x4) // (0x2 ^ 0x3)) // 0x5) == 0x2))
52−assert(- (((0x3 + (((0x4 * 0x5) // ((0x2 ^ 0x3) ^ 0x2)) // 0x9)) + ((0x4 % 0xa) / 0x3)) == (((- 0x3) + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3))))
52+assert((- (((0x3 + (((0x4 * 0x5) // ((0x2 ^ 0x3) ^ 0x2)) // 0x9)) + ((0x4 % 0xa) / 0x3)) == (((- 0x3) + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3)))))
53−assert(not ((true or false) and nil))
53+assert((not ((true or false) and nil)))
54assert((true or (false and nil)))
54assert((true or (false and nil)))
55assert(((((0x1 or false) and true) or false) == true))
55assert(((((0x1 or false) and true) or false) == true))
56assert(((((nil and true) or false) and true) == false))
56assert(((((nil and true) or false) and true) == false))
57local a,b = 0x1,nil
57local a,b = 0x1,nil
58;
58;
59−assert(- ((0x1 or 0x2) == - (0x1 and (((0x1 and 0x2) + (- (1.25 or - 0x4))) == 0.75))))
59+assert((- ((0x1 or 0x2) == (- (0x1 and (((0x1 and 0x2) + (- (1.25 or (- 0x4)))) == 0.75))))))
60;
60;
61local x = ((((b or a) + 0x1) == 0x2) and (((0xa or a) + 0x1) == 0xb))
61local x = ((((b or a) + 0x1) == 0x2) and (((0xa or a) + 0x1) == 0xb))
62;
62;
@@ -76,7 +76,7 @@ assert((((x > y) and x) or (y == 0x2)))
76;
76;
77assert(((0x499602d2 == tonumber("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}")) and ((0x499602d2 + 0x1) == 0x499602d3)))
77assert(((0x499602d2 == tonumber("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}")) and ((0x499602d2 + 0x1) == 0x499602d3)))
78do
78do
79−local operand = {0x3,0x64,5.0,- 0xa,- 5.0,0x2710,- 0x2710}
79+local operand = {0x3,0x64,5.0,(- 0xa),(- 5.0),0x2710,(- 0x2710)}
80local operator = {"\u{2b}","\u{2d}","\u{2a}","\u{2f}","\u{2f}\u{2f}","\u{25}","\u{5e}","\u{26}","\u{7c}","\u{5e}","\u{3c}\u{3c}","\u{3e}\u{3e}","\u{3d}\u{3d}","\u{7e}\u{3d}","\u{3c}","\u{3e}","\u{3c}\u{3d}","\u{3e}\u{3d}"}
80local operator = {"\u{2b}","\u{2d}","\u{2a}","\u{2f}","\u{2f}\u{2f}","\u{25}","\u{5e}","\u{26}","\u{7c}","\u{5e}","\u{3c}\u{3c}","\u{3e}\u{3e}","\u{3d}\u{3d}","\u{7e}\u{3d}","\u{3c}","\u{3e}","\u{3c}\u{3d}","\u{3e}\u{3d}"}
81for _,op in ipairs(operator)
81for _,op in ipairs(operator)
82do
82do
@@ -135,9 +135,9 @@ do
135local code = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{7b}"}
135local code = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{7b}"}
136for i = 0x1, 0x101
136for i = 0x1, 0x101
137do
137do
138−code[# (code + 0x1)]=(i .. "\u{2e}\u{31}\u{2c}")
138+code[(# (code + 0x1))]=(i .. "\u{2e}\u{31}\u{2c}")
139end
139end
140−code[# (code + 0x1)]="\u{7d}\u{3b}"
140+code[(# (code + 0x1))]="\u{7d}\u{3b}"
141code=table.concat(code)
141code=table.concat(code)
142local function check
142local function check
143(ret,val)
143(ret,val)
@@ -199,12 +199,12 @@ local i = 0x3
199local t = {}
199local t = {}
200;
200;
201local a = nil
201local a = nil
202−while not a do
202+while (not a) do
203a=0x0
203a=0x0
204;
204;
205for i = 0x1, n
205for i = 0x1, n
206do
206do
207−for i = i, 0x1, - 0x1
207+for i = i, 0x1, (- 0x1)
208do
208do
209a=(a + 0x1)
209a=(a + 0x1)
210;
210;
@@ -217,7 +217,7 @@ end
217end
217end
218assert(((a == ((n * (n + 0x1)) / 0x2)) and (i == 0x3)))
218assert(((a == ((n * (n + 0x1)) / 0x2)) and (i == 0x3)))
219;
219;
220−assert(((t[0x1] and t[n]) and not (t[0x0] and not t[(n + 0x1)])))
220+assert(((t[0x1] and t[n]) and (not (t[0x0] and (not t[(n + 0x1)])))))
221function f(b)
221function f(b)
222local x = 0x1
222local x = 0x1
223;
223;
@@ -305,7 +305,7 @@ end
305local a,b,c = f()
305local a,b,c = f()
306;
306;
307assert((((a == 0x1) and (b == 0x2)) and (c == 0x3)))
307assert((((a == 0x1) and (b == 0x2)) and (c == 0x3)))
308−a,b,c=(f())
308+a,b,c=f()
309;
309;
310assert((((a == 0x1) and (b == nil)) and (c == nil)))
310assert((((a == 0x1) and (b == nil)) and (c == nil)))
311end
311end
@@ -340,7 +340,7 @@ f,a=load(f)()
340;
340;
341assert(((a.a == 0x1) and a.b))
341assert(((a.a == 0x1) and a.b))
342function g(a,b,c,d,e)
342function g(a,b,c,d,e)
343−if not ((((a >= b) or c) or (d and e)) or nil) then
343+if (not ((((a >= b) or c) or (d and e)) or nil)) then
344return 0x0
344return 0x0
345else
345else
346return 0x1
346return 0x1
@@ -364,7 +364,7 @@ assert((((f(0x1,0x2,nil,0x1,"\u{78}") == "\u{78}") and (g(0x1,0x2,nil,0x1,"\u{78
364assert((((f(0x1,0x2,nil,nil,"\u{78}") == nil) and (g(0x1,0x2,nil,nil,"\u{78}") == 0x0)) and (h(0x1,0x2,nil,nil,"\u{78}") == 0x0)))
364assert((((f(0x1,0x2,nil,nil,"\u{78}") == nil) and (g(0x1,0x2,nil,nil,"\u{78}") == 0x0)) and (h(0x1,0x2,nil,nil,"\u{78}") == 0x0)))
365assert((((f(0x1,0x2,nil,0x1,nil) == nil) and (g(0x1,0x2,nil,0x1,nil) == 0x0)) and (h(0x1,0x2,nil,0x1,nil) == 0x0)))
365assert((((f(0x1,0x2,nil,0x1,nil) == nil) and (g(0x1,0x2,nil,0x1,nil) == 0x0)) and (h(0x1,0x2,nil,0x1,nil) == 0x0)))
366assert((((0x1 and ((0x2 < 0x3) == true)) and (0x2 < 0x3)) and (("\u{61}" < "\u{62}") == true)))
366assert((((0x1 and ((0x2 < 0x3) == true)) and (0x2 < 0x3)) and (("\u{61}" < "\u{62}") == true)))
367−x=((0x2 < 0x3) and not 0x3)
367+x=((0x2 < 0x3) and (not 0x3))
368;
368;
369assert((x == false))
369assert((x == false))
370x=((0x2 < 0x1) or ((0x2 > 0x1) and "\u{61}"))
370x=((0x2 < 0x1) or ((0x2 > 0x1) and "\u{61}"))
@@ -407,7 +407,7 @@ prog="\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6b}\u{31}\u
407end
407end
408print(("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{2d}\u{63}\u{69}\u{72}\u{63}\u{75}\u{69}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{28}" .. (_ENV.GLOB1 .. "\u{29}")))
408print(("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{2d}\u{63}\u{69}\u{72}\u{63}\u{75}\u{69}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{28}" .. (_ENV.GLOB1 .. "\u{29}")))
409local binops <const> = {{"\u{20}\u{61}\u{6e}\u{64}\u{20}",function (a,b)
409local binops <const> = {{"\u{20}\u{61}\u{6e}\u{64}\u{20}",function (a,b)
410−if not a then
410+if (not a) then
411return a
411return a
412else
412else
413return b
413return b
@@ -432,8 +432,8 @@ do
432for _,op in ipairs(binops)
432for _,op in ipairs(binops)
433do
433do
434local t = {("\u{28}" .. (v1[0x1] .. (op[0x1] .. (v2[0x1] .. "\u{29}")))),op[0x2](v1[0x2],v2[0x2])}
434local t = {("\u{28}" .. (v1[0x1] .. (op[0x1] .. (v2[0x1] .. "\u{29}")))),op[0x2](v1[0x2],v2[0x2])}
435−res[# (res + 0x1)]=t
435+res[(# (res + 0x1))]=t
436−res[# (res + 0x1)]={("\u{6e}\u{6f}\u{74}" .. t[0x1]),not t[0x2]}
436+res[(# (res + 0x1))]={("\u{6e}\u{6f}\u{74}" .. t[0x1]),(not t[0x2])}
437end
437end
438end
438end
439end
439end
@@ -455,7 +455,7 @@ do
455local s = v[0x1]
455local s = v[0x1]
456local p = load(string.format(prog,s,s),"")
456local p = load(string.format(prog,s,s),"")
457IX=false
457IX=false
458−assert(((p() == v[0x2]) and (IX == not not v[0x2])))
458+assert(((p() == v[0x2]) and (IX == (not (not v[0x2])))))
459i=(i + 0x1)
459i=(i + 0x1)
460if ((i % 0xea60) == 0x0) then
460if ((i % 0xea60) == 0x0) then
461print("\u{2b}")
461print("\u{2b}")
desk/res/lua/cycled/coroutine.lua+65−65
@@ -3,15 +3,15 @@ local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3local f
3local f
4local main,ismain = coroutine.running()
4local main,ismain = coroutine.running()
5assert(((type(main) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and ismain))
5assert(((type(main) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and ismain))
6−assert(not coroutine.resume(main))
6+assert((not coroutine.resume(main)))
7−assert(not (coroutine.isyieldable(main) and not coroutine.isyieldable()))
7+assert((not (coroutine.isyieldable(main) and (not coroutine.isyieldable()))))
8−assert(not pcall(coroutine.yield))
8+assert((not pcall(coroutine.yield)))
9−assert(not pcall(coroutine.resume,0x0))
9+assert((not pcall(coroutine.resume,0x0)))
10−assert(not pcall(coroutine.status,0x0))
10+assert((not pcall(coroutine.status,0x0)))
11local function eqtab
11local function eqtab
12(t1,t2)
12(t1,t2)
13−assert(# (t1 == # t2))
13+assert((# (t1 == (# t2))))
14−for i = 0x1, # t1
14+for i = 0x1, (# t1)
15do
15do
16local v = t1[i]
16local v = t1[i]
17assert((t2[i] == v))
17assert((t2[i] == v))
@@ -27,7 +27,7 @@ assert((coroutine.resume(f) == false))
27assert((coroutine.status(f) == "\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
27assert((coroutine.status(f) == "\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
28local arg = {...}
28local arg = {...}
29assert(coroutine.isyieldable(x))
29assert(coroutine.isyieldable(x))
30−for i = 0x1, # arg
30+for i = 0x1, (# arg)
31do
31do
32_G.x={coroutine.yield(table.unpack(arg[i]))}
32_G.x={coroutine.yield(table.unpack(arg[i]))}
33end
33end
@@ -53,7 +53,7 @@ eqtab(_G.x,{"\u{78}\u{75}\u{78}\u{75}"})
53assert(((((s and (a == 0x1)) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
53assert(((((s and (a == 0x1)) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
54assert((coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))
54assert((coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))
55s,a=coroutine.resume(f,"\u{78}\u{75}\u{78}\u{75}")
55s,a=coroutine.resume(f,"\u{78}\u{75}\u{78}\u{75}")
56−assert(not ((s and string.find(a,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}")))
56+assert((not ((s and string.find(a,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))))
57_G.f=nil
57_G.f=nil
58local function foo
58local function foo
59(i)
59(i)
@@ -121,7 +121,7 @@ end
121table.insert(a,n)
121table.insert(a,n)
122x=filter(n,x)
122x=filter(n,x)
123end
123end
124−assert(# ((a == 0x16) and (a[# a] == 0x4f)))
124+assert((# ((a == 0x16) and (a[(# a)] == 0x4f))))
125x,a=nil
125x,a=nil
126print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
126print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
127local function func2close
127local function func2close
@@ -137,12 +137,12 @@ assert((st and (msg == nil)))
137st,msg=coroutine.close(co)
137st,msg=coroutine.close(co)
138assert((st and (msg == nil)))
138assert((st and (msg == nil)))
139local st,msg = pcall(coroutine.close,coroutine.running())
139local st,msg = pcall(coroutine.close,coroutine.running())
140−assert(not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")))
140+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))))
141local main = coroutine.running()
141local main = coroutine.running()
142;
142;
143(coroutine.wrap(function ()
143(coroutine.wrap(function ()
144local st,msg = pcall(coroutine.close,main)
144local st,msg = pcall(coroutine.close,main)
145−assert(not (st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")))
145+assert((not (st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))))
146end))()
146end))()
147do
147do
148local co
148local co
@@ -155,14 +155,14 @@ end)
155local st,msg = coroutine.resume(co)
155local st,msg = coroutine.resume(co)
156assert((st and (msg == 0x14)))
156assert((st and (msg == 0x14)))
157st,msg=coroutine.close(co)
157st,msg=coroutine.close(co)
158−assert(not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}")))
158+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
159end
159end
160local X
160local X
161local co = coroutine.create(error)
161local co = coroutine.create(error)
162local st,msg = coroutine.resume(co,0x64)
162local st,msg = coroutine.resume(co,0x64)
163−assert(not (st and (msg == 0x64)))
163+assert((not (st and (msg == 0x64))))
164st,msg=coroutine.close(co)
164st,msg=coroutine.close(co)
165−assert(not (st and (msg == 0x64)))
165+assert((not (st and (msg == 0x64))))
166st,msg=coroutine.close(co)
166st,msg=coroutine.close(co)
167assert((st and (msg == nil)))
167assert((st and (msg == nil)))
168co=coroutine.create(function ()
168co=coroutine.create(function ()
@@ -177,7 +177,7 @@ end)
177coroutine.resume(co)
177coroutine.resume(co)
178assert(X)
178assert(X)
179assert(coroutine.close(co))
179assert(coroutine.close(co))
180−assert(not (X and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")))
180+assert((not (X and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))))
181local x = 0x0
181local x = 0x0
182co=coroutine.create(function ()
182co=coroutine.create(function ()
183local y <close> = func2close(function (self,err)
183local y <close> = func2close(function (self,err)
@@ -215,7 +215,7 @@ local co = coroutine.create(function ()
215return pcall(foo)
215return pcall(foo)
216end)
216end)
217local st1,st2,err = coroutine.resume(co)
217local st1,st2,err = coroutine.resume(co)
218−assert((st1 and not (st2 and (err == 0x2b))))
218+assert((st1 and (not (st2 and (err == 0x2b)))))
219assert(((X == 0x2b) and (Y.what == "\u{43}")))
219assert(((X == 0x2b) and (Y.what == "\u{43}")))
220local track = {}
220local track = {}
221local function h
221local function h
@@ -226,20 +226,20 @@ end
226local function foo
226local function foo
227()
227()
228local x <close> = func2close(function (_,msg)
228local x <close> = func2close(function (_,msg)
229−track[# (track + 0x1)]=(msg or false)
229+track[(# (track + 0x1))]=(msg or false)
230error(0x14)
230error(0x14)
231end)
231end)
232local y <close> = func2close(function (_,msg)
232local y <close> = func2close(function (_,msg)
233−track[# (track + 0x1)]=(msg or false)
233+track[(# (track + 0x1))]=(msg or false)
234return 0x3e8
234return 0x3e8
235end)
235end)
236local z <close> = func2close(function (_,msg)
236local z <close> = func2close(function (_,msg)
237−track[# (track + 0x1)]=(msg or false)
237+track[(# (track + 0x1))]=(msg or false)
238error(0xa)
238error(0xa)
239end)
239end)
240coroutine.yield(0x1)
240coroutine.yield(0x1)
241h(func2close(function (_,msg)
241h(func2close(function (_,msg)
242−track[# (track + 0x1)]=(msg or false)
242+track[(# (track + 0x1))]=(msg or false)
243error(0x2)
243error(0x2)
244end))
244end))
245end
245end
@@ -248,11 +248,11 @@ local st,res = coroutine.resume(co,foo)
248assert((st and (res == 0x1)))
248assert((st and (res == 0x1)))
249local st,res1,res2 = coroutine.resume(co)
249local st,res1,res2 = coroutine.resume(co)
250assert((coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))
250assert((coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))
251−assert((st and not (res1 and (res2 == 0x14))))
251+assert((st and (not (res1 and (res2 == 0x14)))))
252assert(((((track[0x1] == false) and (track[0x2] == 0x2)) and (track[0x3] == 0xa)) and (track[0x4] == 0xa)))
252assert(((((track[0x1] == false) and (track[0x2] == 0x2)) and (track[0x3] == 0xa)) and (track[0x4] == 0xa)))
253end
253end
254local co = coroutine.wrap(function ()
254local co = coroutine.wrap(function ()
255−assert(not pcall(table.sort,{0x1,0x2,0x3},coroutine.yield))
255+assert((not pcall(table.sort,{0x1,0x2,0x3},coroutine.yield)))
256assert(coroutine.isyieldable())
256assert(coroutine.isyieldable())
257coroutine.yield(0x14)
257coroutine.yield(0x14)
258return 0x1e
258return 0x1e
@@ -282,7 +282,7 @@ do
282assert((f1(i) == i))
282assert((f1(i) == i))
283end
283end
284local r1,r2,v = f1(nil)
284local r1,r2,v = f1(nil)
285−assert((r1 and not (r2 and (v[0x1] == (((0xa + 0x1) * 0xa) / 0x2)))))
285+assert((r1 and (not (r2 and (v[0x1] == (((0xa + 0x1) * 0xa) / 0x2))))))
286local function f
286local function f
287(a,b)
287(a,b)
288a=coroutine.yield(a)
288a=coroutine.yield(a)
@@ -298,11 +298,11 @@ coroutine.yield(xpcall(f,g,0xa,0x14))
298end)
298end)
299assert((co() == 0xa))
299assert((co() == 0xa))
300local r,msg = co(0x64)
300local r,msg = co(0x64)
301−assert(not (r and (msg == 0xf0)))
301+assert((not (r and (msg == 0xf0))))
302do
302do
303local function f
303local function f
304(c)
304(c)
305−assert(not coroutine.isyieldable())
305+assert((not coroutine.isyieldable()))
306return (c .. c)
306return (c .. c)
307end
307end
308local co = coroutine.wrap(function (c)
308local co = coroutine.wrap(function (c)
@@ -321,14 +321,14 @@ end)
321local trace = {}
321local trace = {}
322local function dotrace
322local function dotrace
323(event)
323(event)
324−trace[# (trace + 0x1)]=event
324+trace[(# (trace + 0x1))]=event
325end
325end
326debug.sethook(co,dotrace,"\u{63}\u{6c}\u{72}")
326debug.sethook(co,dotrace,"\u{63}\u{6c}\u{72}")
327repeat
327repeat
328
328
329−until not coroutine.resume(co)
329+until (not coroutine.resume(co))
330local correcttrace = {"\u{63}\u{61}\u{6c}\u{6c}","\u{6c}\u{69}\u{6e}\u{65}","\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{6c}\u{69}\u{6e}\u{65}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"}
330local correcttrace = {"\u{63}\u{61}\u{6c}\u{6c}","\u{6c}\u{69}\u{6e}\u{65}","\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{6c}\u{69}\u{6e}\u{65}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"}
331−assert(# (trace == # correcttrace))
331+assert((# (trace == (# correcttrace))))
332for k,v in pairs(trace)
332for k,v in pairs(trace)
333do
333do
334assert((v == correcttrace[k]))
334assert((v == correcttrace[k]))
@@ -346,14 +346,14 @@ end
346x=coroutine.wrap(goo)
346x=coroutine.wrap(goo)
347assert((x() == 0x3))
347assert((x() == 0x3))
348local a,b = pcall(x)
348local a,b = pcall(x)
349−assert(not (a and (b == foo)))
349+assert((not (a and (b == foo))))
350x=coroutine.create(goo)
350x=coroutine.create(goo)
351a,b=coroutine.resume(x)
351a,b=coroutine.resume(x)
352assert((a and (b == 0x3)))
352assert((a and (b == 0x3)))
353a,b=coroutine.resume(x)
353a,b=coroutine.resume(x)
354−assert(not ((a and (b == foo)) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")))
354+assert((not ((a and (b == foo)) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
355a,b=coroutine.resume(x)
355a,b=coroutine.resume(x)
356−assert(not ((a and string.find(b,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")))
356+assert((not ((a and string.find(b,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
357goo=nil
357goo=nil
358local function all
358local function all
359(a,n,k)
359(a,n,k)
@@ -432,7 +432,7 @@ end)
432return pcall(A,0x1)
432return pcall(A,0x1)
433end)
433end)
434st,res=A()
434st,res=A()
435−assert(not ((st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (X == true)))
435+assert((not ((st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (X == true))))
436end
436end
437do
437do
438local co
438local co
@@ -443,9 +443,9 @@ end)
443error(0x6f)
443error(0x6f)
444end)
444end)
445local st,errobj = pcall(co)
445local st,errobj = pcall(co)
446−assert(not (st and (errobj == 0x6f)))
446+assert((not (st and (errobj == 0x6f))))
447st,errobj=pcall(co)
447st,errobj=pcall(co)
448−assert(not (st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}")))
448+assert((not (st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
449end
449end
450local co1,co2
450local co1,co2
451co1=coroutine.create(function ()
451co1=coroutine.create(function ()
@@ -453,7 +453,7 @@ return co2()
453end)
453end)
454co2=coroutine.wrap(function ()
454co2=coroutine.wrap(function ()
455assert((coroutine.status(co1) == "\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))
455assert((coroutine.status(co1) == "\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))
456−assert(not coroutine.resume(co1))
456+assert((not coroutine.resume(co1)))
457coroutine.yield(0x3)
457coroutine.yield(0x3)
458end)
458end)
459a,b=coroutine.resume(co1)
459a,b=coroutine.resume(co1)
@@ -462,7 +462,7 @@ assert((coroutine.status(co1) == "\u{64}\u{65}\u{61}\u{64}"))
462a=function (a)
462a=function (a)
463coroutine.wrap(a)(a)
463coroutine.wrap(a)(a)
464end
464end
465−assert(not pcall(a,a))
465+assert((not pcall(a,a)))
466a=nil
466a=nil
467local x = coroutine.create(function ()
467local x = coroutine.create(function ()
468local a = 0xa
468local a = 0xa
@@ -473,12 +473,12 @@ return a
473end
473end
474error("\u{78}")
474error("\u{78}")
475end)
475end)
476−assert(not coroutine.resume(x))
476+assert((not coroutine.resume(x)))
477−assert(not coroutine.resume(x,0x1,0x1,0x1,0x1,0x1,0x1,0x1))
477+assert((not coroutine.resume(x,0x1,0x1,0x1,0x1,0x1,0x1,0x1)))
478assert((_G.F() == 0xb))
478assert((_G.F() == 0xb))
479assert((_G.F() == 0xc))
479assert((_G.F() == 0xc))
480_G.F=nil
480_G.F=nil
481−if not T then
481+if (not T) then
482(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
482(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
483else
483else
484print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}")
484print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}")
@@ -529,7 +529,7 @@ a[i]=i
529end
529end
530T.sethook("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x1)
530T.sethook("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x1)
531local a1 = {table.unpack(a)}
531local a1 = {table.unpack(a)}
532−assert(# (a1 == n))
532+assert((# (a1 == n)))
533for i = 0x1, n
533for i = 0x1, n
534do
534do
535assert((a[i] == i))
535assert((a[i] == i))
@@ -539,22 +539,22 @@ end)
539end
539end
540local co = test(0x0)
540local co = test(0x0)
541;
541;
542−while not done do
542+while (not done) do
543co(0x1e)
543co(0x1e)
544end
544end
545co=test(0x1)
545co=test(0x1)
546;
546;
547−while not done do
547+while (not done) do
548co(0x14,0xa)
548co(0x14,0xa)
549end
549end
550co=test(0x3)
550co=test(0x3)
551;
551;
552−while not done do
552+while (not done) do
553co()
553co()
554end
554end
555co=test(0x64)
555co=test(0x64)
556;
556;
557−while not done do
557+while (not done) do
558co()
558co()
559end
559end
560end
560end
@@ -643,13 +643,13 @@ assert((((n == "\u{61}") and (v == 0x1)) and (debug.getlocal(c,0x0,0x2) ~= "\u{6
643assert(debug.setlocal(c,0x0,0x1,0xa))
643assert(debug.setlocal(c,0x0,0x1,0xa))
644local t = debug.getinfo(c,0x0)
644local t = debug.getinfo(c,0x0)
645assert((t.currentline == (t.linedefined + 0x2)))
645assert((t.currentline == (t.linedefined + 0x2)))
646−assert(not debug.getinfo(c,0x1))
646+assert((not debug.getinfo(c,0x1)))
647assert(coroutine.resume(c))
647assert(coroutine.resume(c))
648local n,v = debug.getlocal(c,0x0,0x2)
648local n,v = debug.getlocal(c,0x0,0x2)
649assert(((n == "\u{62}") and (v == 0xa)))
649assert(((n == "\u{62}") and (v == 0xa)))
650v={coroutine.resume(c)}
650v={coroutine.resume(c)}
651assert(((((v[0x1] == true) and (v[0x2] == 0x2)) and (v[0x3] == 0x3)) and (v[0x4] == undef)))
651assert(((((v[0x1] == true) and (v[0x2] == 0x2)) and (v[0x3] == 0x3)) and (v[0x4] == undef)))
652−assert(not coroutine.resume(c))
652+assert((not coroutine.resume(c)))
653end
653end
654do
654do
655local c = coroutine.create(function ()
655local c = coroutine.create(function ()
@@ -657,7 +657,7 @@ T.testC("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}",0xa,0x14)
657end)
657end)
658local a,b = coroutine.resume(c)
658local a,b = coroutine.resume(c)
659assert((a and (b == 0x14)))
659assert((a and (b == 0x14)))
660−assert((debug.getinfo(c,0x0).linedefined == - 0x1))
660+assert((debug.getinfo(c,0x0).linedefined == (- 0x1)))
661a,b=debug.getlocal(c,0x0,0x2)
661a,b=debug.getlocal(c,0x0,0x2)
662assert((b == 0xa))
662assert((b == 0xa))
663end
663end
@@ -676,7 +676,7 @@ a,b,c,d=T.testC("\u{20}\u{20}\u{20}\u{20}\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{
676assert(((((a == coroutine.running()) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (d == 0x4)))
676assert(((((a == coroutine.running()) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (d == 0x4)))
677local state = T.newstate()
677local state = T.newstate()
678assert(T.testC(state,"\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
678assert(T.testC(state,"\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679−assert(not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679+assert((not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
680T.testC(state,"\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}")
680T.testC(state,"\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}")
681T.loadlib(state)
681T.loadlib(state)
682assert(T.doremote(state,"\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{27}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{58}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{78}\u{2c}\u{20}\u{27}\u{42}\u{42}\u{27}\u{29}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{43}\u{43}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}"))
682assert(T.doremote(state,"\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{27}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{58}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{78}\u{2c}\u{20}\u{27}\u{42}\u{42}\u{27}\u{29}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{43}\u{43}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}"))
@@ -696,17 +696,17 @@ end
696coroutine.yield()
696coroutine.yield()
697end)
697end)
698_G.TO_SURVIVE()
698_G.TO_SURVIVE()
699−if not _soft then
699+if (not _soft) then
700local lim = 0xf4240
700local lim = 0xf4240
701local t = {(lim - 0xa),(lim - 0x5),(lim - 0x1),lim,(lim + 0x1),(lim + 0x5)}
701local t = {(lim - 0xa),(lim - 0x5),(lim - 0x1),lim,(lim + 0x1),(lim + 0x5)}
702−for i = 0x1, # t
702+for i = 0x1, (# t)
703do
703do
704local j = t[i]
704local j = t[i]
705local co = coroutine.create(function ()
705local co = coroutine.create(function ()
706return table.unpack({},0x1,j)
706return table.unpack({},0x1,j)
707end)
707end)
708local r,msg = coroutine.resume(co)
708local r,msg = coroutine.resume(co)
709−assert(((j < lim) or not r))
709+assert(((j < lim) or (not r)))
710end
710end
711end
711end
712assert((coroutine.running() == main))
712assert((coroutine.running() == main))
@@ -763,11 +763,11 @@ return (val(a) % val(b))
763end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a,b)
763end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a,b)
764coroutine.yield(nil,"\u{75}\u{6e}\u{6d}")
764coroutine.yield(nil,"\u{75}\u{6e}\u{6d}")
765;
765;
766−return - val(a)
766+return (- val(a))
767end,["\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}"] = function (a,b)
767end,["\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}"] = function (a,b)
768coroutine.yield(nil,"\u{62}\u{6e}\u{6f}\u{74}")
768coroutine.yield(nil,"\u{62}\u{6e}\u{6f}\u{74}")
769;
769;
770−return ~ val(a)
770+return (~ val(a))
771end,["\u{5f}\u{5f}\u{73}\u{68}\u{6c}"] = function (a,b)
771end,["\u{5f}\u{5f}\u{73}\u{68}\u{6c}"] = function (a,b)
772coroutine.yield(nil,"\u{73}\u{68}\u{6c}")
772coroutine.yield(nil,"\u{73}\u{68}\u{6c}")
773;
773;
@@ -851,7 +851,7 @@ return (0x1 + a)
851end,{"\u{61}\u{64}\u{64}"}) == 0xb))
851end,{"\u{61}\u{64}\u{64}"}) == 0xb))
852assert((run(function ()
852assert((run(function ()
853return (a - 0x19)
853return (a - 0x19)
854−end,{"\u{73}\u{75}\u{62}"}) == - 0xf))
854+end,{"\u{73}\u{75}\u{62}"}) == (- 0xf)))
855assert((run(function ()
855assert((run(function ()
856return (0x2 * a)
856return (0x2 * a)
857end,{"\u{6d}\u{75}\u{6c}"}) == 0x14))
857end,{"\u{6d}\u{75}\u{6c}"}) == 0x14))
@@ -872,7 +872,7 @@ return (a + b)
872end,{"\u{61}\u{64}\u{64}"}) == 0x16))
872end,{"\u{61}\u{64}\u{64}"}) == 0x16))
873assert((run(function ()
873assert((run(function ()
874return (a - b)
874return (a - b)
875−end,{"\u{73}\u{75}\u{62}"}) == - 0x2))
875+end,{"\u{73}\u{75}\u{62}"}) == (- 0x2)))
876assert((run(function ()
876assert((run(function ()
877return (a * b)
877return (a * b)
878end,{"\u{6d}\u{75}\u{6c}"}) == 0x78))
878end,{"\u{6d}\u{75}\u{6c}"}) == 0x78))
@@ -894,7 +894,7 @@ return (a1000 + 0x3e8)
894end,{"\u{61}\u{64}\u{64}"}) == 0x7d0))
894end,{"\u{61}\u{64}\u{64}"}) == 0x7d0))
895assert((run(function ()
895assert((run(function ()
896return (a1000 - 0x61a8)
896return (a1000 - 0x61a8)
897−end,{"\u{73}\u{75}\u{62}"}) == - 0x5dc0))
897+end,{"\u{73}\u{75}\u{62}"}) == (- 0x5dc0)))
898assert((run(function ()
898assert((run(function ()
899return (0x7d0 * a)
899return (0x7d0 * a)
900end,{"\u{6d}\u{75}\u{6c}"}) == 0x4e20))
900end,{"\u{6d}\u{75}\u{6c}"}) == 0x4e20))
@@ -911,8 +911,8 @@ assert((run(function ()
911return (a % b)
911return (a % b)
912end,{"\u{6d}\u{6f}\u{64}"}) == 0xa))
912end,{"\u{6d}\u{6f}\u{64}"}) == 0xa))
913assert((run(function ()
913assert((run(function ()
914−return ~ (a & b)
914+return (~ (a & b))
915−end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == ~ (0xa & 0xc)))
915+end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == (~ (0xa & 0xc))))
916assert((run(function ()
916assert((run(function ()
917return (a | b)
917return (a | b)
918end,{"\u{62}\u{6f}\u{72}"}) == (0xa | 0xc)))
918end,{"\u{62}\u{6f}\u{72}"}) == (0xa | 0xc)))
@@ -1042,13 +1042,13 @@ return T.testC(table.unpack(x))
1042end)
1042end)
1043end
1043end
1044local a = {apico("\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}\u{a}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{72}\u{72}\u{69}\u{76}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{29}\u{a}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}",error)()}
1044local a = {apico("\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}\u{a}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{72}\u{72}\u{69}\u{76}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{29}\u{a}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}",error)()}
1045−assert(# (((((a == 0x4) and (a[0x3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}")) and (a[0x4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}")) and (_G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (_G.ctx == 0x2)))
1045+assert((# (((((a == 0x4) and (a[0x3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}")) and (a[0x4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}")) and (_G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (_G.ctx == 0x2))))
1046local co = apico("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{3b}",coroutine.yield,"\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{34}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")
1046local co = apico("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{3b}",coroutine.yield,"\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{34}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")
1047assert((co() == 0xa))
1047assert((co() == 0xa))
1048assert((co(0x14,0x1e) == "\u{61}"))
1048assert((co(0x14,0x1e) == "\u{61}"))
1049a={co()}
1049a={co()}
1050−assert(# ((((((((a == 0xa) and (a[0x2] == coroutine.yield)) and (a[0x5] == 0x14)) and (a[0x6] == 0x1e)) and (a[0x7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0x8] == 0x3)) and (a[0x9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0xa] == 0x4)))
1050+assert((# ((((((((a == 0xa) and (a[0x2] == coroutine.yield)) and (a[0x5] == 0x14)) and (a[0x6] == 0x1e)) and (a[0x7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0x8] == 0x3)) and (a[0x9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0xa] == 0x4))))
1051−assert(not pcall(co))
1051+assert((not pcall(co)))
1052f=T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}\u{3b}")
1052f=T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}\u{3b}")
1053co=coroutine.wrap(function ()
1053co=coroutine.wrap(function ()
1054assert((f() == 0x17))
1054assert((f() == 0x17))
@@ -1081,7 +1081,7 @@ return f(nil)
1081end)
1081end)
1082assert((co() == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}"))
1082assert((co() == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}"))
1083a={co()}
1083a={co()}
1084−assert(# ((((a == 0x3) and (a[0x1] == a[0x2])) and (a[0x2] == a[0x3])) and (a[0x3] == 0x22)))
1084+assert((# ((((a == 0x3) and (a[0x1] == a[0x2])) and (a[0x2] == a[0x3])) and (a[0x3] == 0x22))))
1085local y
1085local y
1086co=coroutine.wrap(function (...)
1086co=coroutine.wrap(function (...)
1087return T.testC("\u{20}\u{23}\u{20}\u{69}\u{6e}\u{69}\u{74}\u{69}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{31}\u{73}\u{74}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{33}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{32}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{34}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{33}\u{74}\u{68}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{20}\u{20}\u{20}\u{23}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{68}\u{69}\u{63}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{20}\u{61}\u{72}\u{67}\u{2e}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{43}\u{27}\u{20}\u{68}\u{65}\u{72}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{32}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{9}\u{9}\u{23}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{32}\u{20}\u{32}\u{20}\u{35}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6a}\u{75}\u{6d}\u{70}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{34}\u{74}\u{68}\u{20}\u{28}\u{61}\u{6e}\u{64}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{29}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}",function (a,b)
1087return T.testC("\u{20}\u{23}\u{20}\u{69}\u{6e}\u{69}\u{74}\u{69}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{31}\u{73}\u{74}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{33}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{32}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{34}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{33}\u{74}\u{68}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{20}\u{20}\u{20}\u{23}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{68}\u{69}\u{63}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{20}\u{61}\u{72}\u{67}\u{2e}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{43}\u{27}\u{20}\u{68}\u{65}\u{72}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{32}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{9}\u{9}\u{23}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{32}\u{20}\u{32}\u{20}\u{35}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6a}\u{75}\u{6d}\u{70}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{34}\u{74}\u{68}\u{20}\u{28}\u{61}\u{6e}\u{64}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{29}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}",function (a,b)
@@ -1105,9 +1105,9 @@ a={co(0x7,0x8)}
1105assert(((((((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(a[0x2]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x3]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x4]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x5]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x6]) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
1105assert(((((((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(a[0x2]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x3]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x4]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x5]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x6]) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
1106assert(((a[0x7] == 0x3) and (a[0x8] == 0x4)))
1106assert(((a[0x7] == 0x3) and (a[0x8] == 0x4)))
1107assert(((a[0x9] == 0x7) and (a[0xa] == 0x8)))
1107assert(((a[0x9] == 0x7) and (a[0xa] == 0x8)))
1108−assert((a[0xb]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and # (a == 0xb)))
1108+assert((a[0xb]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and (# (a == 0xb))))
1109assert(((x == "\u{59}\u{49}\u{45}\u{4c}\u{44}") and (y == 0x4)))
1109assert(((x == "\u{59}\u{49}\u{45}\u{4c}\u{44}") and (y == 0x4)))
1110−assert(not pcall(co))
1110+assert((not pcall(co)))
1111_G.ctx=nil
1111_G.ctx=nil
1112_G.status=nil
1112_G.status=nil
1113local co = coroutine.wrap(function ()
1113local co = coroutine.wrap(function ()
desk/res/lua/cycled/cstack.lua+6−6
@@ -3,7 +3,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\
3local function checkerror
3local function checkerror
4(msg,f, ...)
4(msg,f, ...)
5local s,err = pcall(f,...)
5local s,err = pcall(f,...)
6−assert(not (s and string.find(err,msg)))
6+assert((not (s and string.find(err,msg))))
7end
7end
8do
8do
9print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}")
9print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}")
@@ -28,7 +28,7 @@ local p = string.rep("\u{2e}\u{3f}",size)
28return string.match(s,p)
28return string.match(s,p)
29end
29end
30local m = f(0x50)
30local m = f(0x50)
31−assert(# (m == 0x50))
31+assert((# (m == 0x50)))
32checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{6c}\u{65}\u{78}",f,0x7d0)
32checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{6c}\u{65}\u{78}",f,0x7d0)
33end
33end
34do
34do
@@ -69,7 +69,7 @@ end
69local st,msg = xpcall(stack,function ()
69local st,msg = xpcall(stack,function ()
70return "\u{6f}\u{6b}"
70return "\u{6f}\u{6b}"
71end,lim)
71end,lim)
72−assert(not (st and (msg == "\u{6f}\u{6b}")))
72+assert((not (st and (msg == "\u{6f}\u{6b}"))))
73print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
73print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
74end
74end
75do
75do
@@ -91,7 +91,7 @@ end)
91assert(coroutine.resume(coro))
91assert(coroutine.resume(coro))
92end
92end
93local st,msg = coroutine.close(coro)
93local st,msg = coroutine.close(coro)
94−assert(not (st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))
94+assert((not (st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
95print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
95print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
96end
96end
97do
97do
@@ -108,7 +108,7 @@ f()
108end
108end
109local f = coroutine.wrap(body)
109local f = coroutine.wrap(body)
110f()
110f()
111−assert(not pcall(f))
111+assert((not pcall(f)))
112print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
112print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
113end
113end
114do
114do
@@ -126,7 +126,7 @@ end
126if T then
126if T then
127print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{72}\u{65}\u{63}\u{6f}\u{76}\u{65}\u{72}\u{79}")
127print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{72}\u{65}\u{63}\u{6f}\u{76}\u{65}\u{72}\u{79}")
128local N = 0x0
128local N = 0x0
129−local LIM = - 0x1
129+local LIM = (- 0x1)
130local stack1
130local stack1
131local dummy
131local dummy
132local function err
132local function err
desk/res/lua/cycled/db.lua+65−65
@@ -7,7 +7,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{62}\u{75}\
7do
7do
8local a = 0x1
8local a = 0x1
9end
9end
10−assert(not debug.gethook())
10+assert((not debug.gethook()))
11local testline = 0x13
11local testline = 0x13
12local function test
12local function test
13(s,l,p)
13(s,l,p)
@@ -26,26 +26,26 @@ debug.sethook(f,"\u{6c}")
26load(s)()
26load(s)()
27;
27;
28debug.sethook()
28debug.sethook()
29−assert(# (l == 0x0))
29+assert((# (l == 0x0)))
30end
30end
31do
31do
32−assert(not pcall(debug.getinfo,print,"\u{58}"))
32+assert((not pcall(debug.getinfo,print,"\u{58}")))
33−assert(not pcall(debug.getinfo,0x0,"\u{3e}"))
33+assert((not pcall(debug.getinfo,0x0,"\u{3e}")))
34−assert(not debug.getinfo(0x3e8))
34+assert((not debug.getinfo(0x3e8)))
35−assert(not debug.getinfo(- 0x1))
35+assert((not debug.getinfo((- 0x1))))
36local a = debug.getinfo(print)
36local a = debug.getinfo(print)
37assert(((a.what == "\u{43}") and (a.short_src == "\u{5b}\u{43}\u{5d}")))
37assert(((a.what == "\u{43}") and (a.short_src == "\u{5b}\u{43}\u{5d}")))
38a=debug.getinfo(print,"\u{4c}")
38a=debug.getinfo(print,"\u{4c}")
39assert((a.activelines == nil))
39assert((a.activelines == nil))
40local b = debug.getinfo(test,"\u{53}\u{66}\u{4c}")
40local b = debug.getinfo(test,"\u{53}\u{66}\u{4c}")
41−assert(((((((b.name == nil) and (b.what == "\u{4c}\u{75}\u{61}")) and (b.linedefined == testline)) and (b.lastlinedefined == (b.linedefined + 0xa))) and (b.func == test)) and not string.find(b.short_src,"\u{25}\u{5b}")))
41+assert(((((((b.name == nil) and (b.what == "\u{4c}\u{75}\u{61}")) and (b.linedefined == testline)) and (b.lastlinedefined == (b.linedefined + 0xa))) and (b.func == test)) and (not string.find(b.short_src,"\u{25}\u{5b}"))))
42assert((b.activelines[(b.linedefined + 0x1)] and b.activelines[b.lastlinedefined]))
42assert((b.activelines[(b.linedefined + 0x1)] and b.activelines[b.lastlinedefined]))
43−assert(not (b.activelines[b.linedefined] and not b.activelines[(b.lastlinedefined + 0x1)]))
43+assert((not (b.activelines[b.linedefined] and (not b.activelines[(b.lastlinedefined + 0x1)]))))
44end
44end
45do
45do
46local func = load(string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{30}\u{29}"),true))
46local func = load(string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{30}\u{29}"),true))
47local actl = debug.getinfo(func,"\u{4c}").activelines
47local actl = debug.getinfo(func,"\u{4c}").activelines
48−assert(# (actl == 0x0))
48+assert((# (actl == 0x0)))
49end
49end
50local a = "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}"
50local a = "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}"
51local function dostring
51local function dostring
@@ -90,7 +90,7 @@ return ((0x1 + 0x1) and (not (0x1 or g.x())))
90end
90end
91assert((f() == "\u{78}\u{69}\u{78}\u{69}"))
91assert((f() == "\u{78}\u{69}\u{78}\u{69}"))
92g=debug.getinfo(f)
92g=debug.getinfo(f)
93−assert(((((g.what == "\u{4c}\u{75}\u{61}") and (g.func == f)) and (g.namewhat == "")) and not g.name))
93+assert(((((g.what == "\u{4c}\u{75}\u{61}") and (g.func == f)) and (g.namewhat == "")) and (not g.name)))
94function f(x,name)
94function f(x,name)
95name=(name or "\u{66}")
95name=(name or "\u{66}")
96local a = debug.getinfo(0x1)
96local a = debug.getinfo(0x1)
@@ -143,10 +143,10 @@ g={}
143f(g).x=(f(0x2) and (f(0xa) + f(0x9)))
143f(g).x=(f(0x2) and (f(0xa) + f(0x9)))
144assert((g.x == f(0x13)))
144assert((g.x == f(0x13)))
145function g(x)
145function g(x)
146−if not x then
146+if (not x) then
147return 0x3
147return 0x3
148end
148end
149−return (x("\u{61}","\u{78}"))
149+return x("\u{61}","\u{78}")
150end
150end
151assert((g(f) == "\u{61}"))
151assert((g(f) == "\u{61}"))
152until 0x1
152until 0x1
@@ -209,8 +209,8 @@ checkactivelines(load(string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\
209end
209end
210end
210end
211print("\u{2b}")
211print("\u{2b}")
212−assert(not pcall(debug.getlocal,0x14,0x1))
212+assert((not pcall(debug.getlocal,0x14,0x1)))
213−assert(not pcall(debug.setlocal,- 0x1,0x1,0xa))
213+assert((not pcall(debug.setlocal,(- 0x1),0x1,0xa)))
214local function foo
214local function foo
215(a,b, ...)
215(a,b, ...)
216local d,e
216local d,e
@@ -218,30 +218,30 @@ end
218local co = coroutine.create(foo)
218local co = coroutine.create(foo)
219assert((debug.getlocal(foo,0x1) == "\u{61}"))
219assert((debug.getlocal(foo,0x1) == "\u{61}"))
220assert((debug.getlocal(foo,0x2) == "\u{62}"))
220assert((debug.getlocal(foo,0x2) == "\u{62}"))
221−assert(not debug.getlocal(foo,0x3))
221+assert((not debug.getlocal(foo,0x3)))
222assert((debug.getlocal(co,foo,0x1) == "\u{61}"))
222assert((debug.getlocal(co,foo,0x1) == "\u{61}"))
223assert((debug.getlocal(co,foo,0x2) == "\u{62}"))
223assert((debug.getlocal(co,foo,0x2) == "\u{62}"))
224−assert(not debug.getlocal(co,foo,0x3))
224+assert((not debug.getlocal(co,foo,0x3)))
225−assert(not debug.getlocal(print,0x1))
225+assert((not debug.getlocal(print,0x1)))
226local function foo
226local function foo
227()
227()
228−return (debug.getlocal(0x1,- 0x1))
228+return debug.getlocal(0x1,(- 0x1))
229end
229end
230−assert(not foo(0xa))
230+assert((not foo(0xa)))
231local function foo
231local function foo
232(a, ...)
232(a, ...)
233local t = table.pack(...)
233local t = table.pack(...)
234for i = 0x1, t.n
234for i = 0x1, t.n
235do
235do
236−local n,v = debug.getlocal(0x1,- i)
236+local n,v = debug.getlocal(0x1,(- i))
237assert(((n == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}") and (v == t[i])))
237assert(((n == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}") and (v == t[i])))
238end
238end
239−assert(not debug.getlocal(0x1,- (t.n + 0x1)))
239+assert((not debug.getlocal(0x1,(- (t.n + 0x1)))))
240−assert(not debug.setlocal(0x1,- (t.n + 0x1),0x1e))
240+assert((not debug.setlocal(0x1,(- (t.n + 0x1)),0x1e)))
241if (t.n > 0x0) then
241if (t.n > 0x0) then
242(function (x)
242(function (x)
243−assert((debug.setlocal(0x2,- 0x1,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
243+assert((debug.setlocal(0x2,(- 0x1),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
244−assert((debug.setlocal(0x2,- t.n,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
244+assert((debug.setlocal(0x2,(- t.n),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
245end)(0x1ae)
245end)(0x1ae)
246assert((... == 0x1ae))
246assert((... == 0x1ae))
247end
247end
@@ -256,7 +256,7 @@ a[i]=i
256end
256end
257foo(table.unpack(a))
257foo(table.unpack(a))
258do
258do
259−assert(not debug.gethook())
259+assert((not debug.gethook()))
260local count = 0x0
260local count = 0x0
261local function f
261local function f
262()
262()
@@ -335,16 +335,16 @@ assert(((x == "\u{42}") and (y == 0xd)))
335end
335end
336end
336end
337g()
337g()
338−assert(((((a[f] and a[g]) and a[assert]) and a[debug.getlocal]) and not a[print]))
338+assert(((((a[f] and a[g]) and a[assert]) and a[debug.getlocal]) and (not a[print])))
339local n,v = debug.getlocal(0x0,0x1)
339local n,v = debug.getlocal(0x0,0x1)
340assert(((v == 0x0) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
340assert(((v == 0x0) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
341local n,v = debug.getlocal(0x0,0x2)
341local n,v = debug.getlocal(0x0,0x2)
342assert(((v == 0x2) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
342assert(((v == 0x2) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
343−assert(not debug.getlocal(0x0,0x3))
343+assert((not debug.getlocal(0x0,0x3)))
344−assert(not debug.getlocal(0x0,0x0))
344+assert((not debug.getlocal(0x0,0x0)))
345function f()
345function f()
346assert((select(0x2,debug.getlocal(0x2,0x3)) == 0x1))
346assert((select(0x2,debug.getlocal(0x2,0x3)) == 0x1))
347−assert(not debug.getlocal(0x2,0x4))
347+assert((not debug.getlocal(0x2,0x4)))
348debug.setlocal(0x2,0x3,0xa)
348debug.setlocal(0x2,0x3,0xa)
349return 0x14
349return 0x14
350end
350end
@@ -355,11 +355,11 @@ assert((g(0x0,0x0) == 0x1e))
355_G.f,_G.g=nil
355_G.f,_G.g=nil
356debug.sethook(nil)
356debug.sethook(nil)
357;
357;
358−assert(not debug.gethook())
358+assert((not debug.gethook()))
359do
359do
360−assert(not debug.setuservalue(io.stdin,0xa))
360+assert((not debug.setuservalue(io.stdin,0xa)))
361local a,b = debug.getuservalue(io.stdin,0xa)
361local a,b = debug.getuservalue(io.stdin,0xa)
362−assert(((a == nil) and not b))
362+assert(((a == nil) and (not b)))
363end
363end
364do
364do
365local function f
365local function f
@@ -376,11 +376,11 @@ debug.sethook(function ()
376count=(count + 0x1)
376count=(count + 0x1)
377end,"",0x1)
377end,"",0x1)
378local t = {table.unpack(a)}
378local t = {table.unpack(a)}
379−assert(# (t == 0x64))
379+assert((# (t == 0x64)))
380t={table.unpack(a,0x1,0x3)}
380t={table.unpack(a,0x1,0x3)}
381−assert(# (t == 0x3))
381+assert((# (t == 0x3)))
382t={f(table.unpack(a,0x1,0x1e))}
382t={f(table.unpack(a,0x1,0x1e))}
383−assert(# (t == 0x1f))
383+assert((# (t == 0x1f)))
384end
384end
385local function collectlocals
385local function collectlocals
386(level)
386(level)
@@ -388,7 +388,7 @@ local tab = {}
388for i = 0x1, math.huge
388for i = 0x1, math.huge
389do
389do
390local n,v = debug.getlocal((level + 0x1),i)
390local n,v = debug.getlocal((level + 0x1),i)
391−if not (n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}")) then
391+if (not (n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}"))) then
392break
392break
393end
393end
394tab[n]=v
394tab[n]=v
@@ -405,21 +405,21 @@ end
405debug.sethook(function (e)
405debug.sethook(function (e)
406assert((e == "\u{63}\u{61}\u{6c}\u{6c}"))
406assert((e == "\u{63}\u{61}\u{6c}\u{6c}"))
407dostring("\u{58}\u{58}\u{20}\u{3d}\u{20}\u{31}\u{32}")
407dostring("\u{58}\u{58}\u{20}\u{3d}\u{20}\u{31}\u{32}")
408−assert(not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}")))
408+assert((not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}"))))
409debug.sethook(function (e,l)
409debug.sethook(function (e,l)
410assert((debug.getinfo(0x2,"\u{6c}").currentline == l))
410assert((debug.getinfo(0x2,"\u{6c}").currentline == l))
411local f,m,c = debug.gethook()
411local f,m,c = debug.gethook()
412assert((e == "\u{6c}\u{69}\u{6e}\u{65}"))
412assert((e == "\u{6c}\u{69}\u{6e}\u{65}"))
413assert(((m == "\u{6c}") and (c == 0x0)))
413assert(((m == "\u{6c}") and (c == 0x0)))
414debug.sethook(nil)
414debug.sethook(nil)
415−assert(not X)
415+assert((not X))
416X=collectlocals(0x2)
416X=collectlocals(0x2)
417end,"\u{6c}")
417end,"\u{6c}")
418end,"\u{63}")
418end,"\u{63}")
419a:f(0x1,0x2,0x3,0x4,0x5)
419a:f(0x1,0x2,0x3,0x4,0x5)
420assert(((((X.self == a) and (X.a == 0x1)) and (X.b == 0x2)) and (X.c == nil)))
420assert(((((X.self == a) and (X.a == 0x1)) and (X.b == 0x2)) and (X.c == nil)))
421assert((XX == 0xc))
421assert((XX == 0xc))
422−assert(not debug.gethook())
422+assert((not debug.gethook()))
423_G.XX=nil
423_G.XX=nil
424do
424do
425local X = false
425local X = false
@@ -453,8 +453,8 @@ assert(X)
453end
453end
454local function eqseq
454local function eqseq
455(t1,t2)
455(t1,t2)
456−assert(# (t1 == # t2))
456+assert((# (t1 == (# t2))))
457−for i = 0x1, # t1
457+for i = 0x1, (# t1)
458do
458do
459assert((t1[i] == t2[i]))
459assert((t1[i] == t2[i]))
460end
460end
@@ -465,7 +465,7 @@ local on = false
465local inp,out
465local inp,out
466local function hook
466local function hook
467(event)
467(event)
468−if not on then
468+if (not on) then
469return
469return
470end
470end
471local ar = debug.getinfo(0x2,"\u{72}\u{75}\u{53}")
471local ar = debug.getinfo(0x2,"\u{72}\u{75}\u{53}")
@@ -473,7 +473,7 @@ local t = {}
473for i = ar.ftransfer, ((ar.ftransfer + ar.ntransfer) - 0x1)
473for i = ar.ftransfer, ((ar.ftransfer + ar.ntransfer) - 0x1)
474do
474do
475local _,v = debug.getlocal(0x2,i)
475local _,v = debug.getlocal(0x2,i)
476−t[# (t + 0x1)]=v
476+t[(# (t + 0x1))]=v
477end
477end
478if (event == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}") then
478if (event == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}") then
479out=t
479out=t
@@ -504,7 +504,7 @@ return ...
504end
504end
505local function foo1
505local function foo1
506()
506()
507−on=not on
507+on=(not on)
508;
508;
509return foo(0x14,0xa,0x0)
509return foo(0x14,0xa,0x0)
510end
510end
@@ -522,10 +522,10 @@ local t = {}
522local i = 0x1
522local i = 0x1
523while true do
523while true do
524local name,value = debug.getupvalue(f,i)
524local name,value = debug.getupvalue(f,i)
525−if not name then
525+if (not name) then
526break
526break
527end
527end
528−assert(not t[name])
528+assert((not t[name]))
529t[name]=value
529t[name]=value
530i=(i + 0x1)
530i=(i + 0x1)
531end
531end
@@ -544,9 +544,9 @@ a=x
544;
544;
545return (c + b)
545return (c + b)
546end
546end
547−assert(not debug.getupvalue(foo1,0x3))
547+assert((not debug.getupvalue(foo1,0x3)))
548−assert(not debug.getupvalue(foo1,0x0))
548+assert((not debug.getupvalue(foo1,0x0)))
549−assert(not debug.setupvalue(foo1,0x3,"\u{78}\u{75}\u{78}\u{75}"))
549+assert((not debug.setupvalue(foo1,0x3,"\u{78}\u{75}\u{78}\u{75}")))
550local t = getupvalues(foo1)
550local t = getupvalues(foo1)
551assert((((t.a == nil) and (t.b == 0x2)) and (t.c == 0x3)))
551assert((((t.a == nil) and (t.b == 0x2)) and (t.c == 0x3)))
552t=getupvalues(foo2)
552t=getupvalues(foo2)
@@ -628,7 +628,7 @@ end,"\u{63}\u{72}")
628h(false)
628h(false)
629debug.sethook()
629debug.sethook()
630local res = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}"}
630local res = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}"}
631−for i = 0x1, # res
631+for i = 0x1, (# res)
632do
632do
633assert((res[i] == table.remove(b,0x1)))
633assert((res[i] == table.remove(b,0x1)))
634end
634end
@@ -677,7 +677,7 @@ assert((debug.traceback(print) == print))
677assert((debug.traceback(print,0x4) == print))
677assert((debug.traceback(print,0x4) == print))
678assert(string.find(debug.traceback("\u{68}\u{69}",0x4),"\u{5e}\u{68}\u{69}\u{a}"))
678assert(string.find(debug.traceback("\u{68}\u{69}",0x4),"\u{5e}\u{68}\u{69}\u{a}"))
679assert(string.find(debug.traceback("\u{68}\u{69}"),"\u{5e}\u{68}\u{69}\u{a}"))
679assert(string.find(debug.traceback("\u{68}\u{69}"),"\u{5e}\u{68}\u{69}\u{a}"))
680−assert(not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
680+assert((not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}")))
681assert(string.find(debug.traceback("\u{68}\u{69}",0x0),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
681assert(string.find(debug.traceback("\u{68}\u{69}",0x0),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
682assert(string.find(debug.traceback(),"\u{5e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{3a}\u{a}"))
682assert(string.find(debug.traceback(),"\u{5e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{3a}\u{a}"))
683do
683do
@@ -751,22 +751,22 @@ assert(x.activelines[i])
751x.activelines[i]=undef
751x.activelines[i]=undef
752end
752end
753assert((next(x.activelines) == nil))
753assert((next(x.activelines) == nil))
754−assert(not debug.getinfo(co,0x2))
754+assert((not debug.getinfo(co,0x2)))
755local a,b = debug.getlocal(co,0x1,0x1)
755local a,b = debug.getlocal(co,0x1,0x1)
756assert(((a == "\u{78}") and (b == 0xa)))
756assert(((a == "\u{78}") and (b == 0xa)))
757a,b=debug.getlocal(co,0x1,0x2)
757a,b=debug.getlocal(co,0x1,0x2)
758assert(((a == "\u{61}") and (b == 0x1)))
758assert(((a == "\u{61}") and (b == 0x1)))
759debug.setlocal(co,0x1,0x2,"\u{68}\u{69}")
759debug.setlocal(co,0x1,0x2,"\u{68}\u{69}")
760assert((debug.gethook(co) == foo))
760assert((debug.gethook(co) == foo))
761−assert(# (((tr == 0x2) and (tr[0x1] == (l.currentline - 0x1))) and (tr[0x2] == l.currentline)))
761+assert((# (((tr == 0x2) and (tr[0x1] == (l.currentline - 0x1))) and (tr[0x2] == l.currentline))))
762a,b,c=pcall(coroutine.resume,co)
762a,b,c=pcall(coroutine.resume,co)
763assert(((a and b) and (c == (l.currentline + 0x1))))
763assert(((a and b) and (c == (l.currentline + 0x1))))
764checktraceback(co,{"\u{79}\u{69}\u{65}\u{6c}\u{64}","\u{69}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{3c}"})
764checktraceback(co,{"\u{79}\u{69}\u{65}\u{6c}\u{64}","\u{69}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{3c}"})
765a,b=coroutine.resume(co)
765a,b=coroutine.resume(co)
766assert((a and (b == "\u{68}\u{69}")))
766assert((a and (b == "\u{68}\u{69}")))
767−assert(# ((tr == 0x4) and (tr[0x4] == (l.currentline + 0x2))))
767+assert((# ((tr == 0x4) and (tr[0x4] == (l.currentline + 0x2)))))
768assert((debug.gethook(co) == foo))
768assert((debug.gethook(co) == foo))
769−assert(not debug.gethook())
769+assert((not debug.gethook()))
770checktraceback(co,{})
770checktraceback(co,{})
771co=coroutine.create(function (x)
771co=coroutine.create(function (x)
772local a,b = coroutine.yield(x)
772local a,b = coroutine.yield(x)
@@ -777,9 +777,9 @@ a,b=coroutine.resume(co,0xa)
777assert((a and (b == 0xa)))
777assert((a and (b == 0xa)))
778a,b=debug.getlocal(co,0x1,0x1)
778a,b=debug.getlocal(co,0x1,0x1)
779assert(((a == "\u{78}") and (b == 0xa)))
779assert(((a == "\u{78}") and (b == 0xa)))
780−assert(not debug.getlocal(co,0x1,0x5))
780+assert((not debug.getlocal(co,0x1,0x5)))
781assert((debug.setlocal(co,0x1,0x1,0x1e) == "\u{78}"))
781assert((debug.setlocal(co,0x1,0x1,0x1e) == "\u{78}"))
782−assert(not debug.setlocal(co,0x1,0x5,0x28))
782+assert((not debug.setlocal(co,0x1,0x5,0x28)))
783a,b=coroutine.resume(co,0x64)
783a,b=coroutine.resume(co,0x64)
784assert((a and (b == 0x1e)))
784assert((a and (b == 0x1e)))
785function f(i)
785function f(i)
@@ -835,15 +835,15 @@ setmetatable(a,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = f,["\u{5f}\u{5f
835local b = setmetatable({},getmetatable(a))
835local b = setmetatable({},getmetatable(a))
836assert((((a[0x3] == "\u{69}\u{6e}\u{64}\u{65}\u{78}") and ((a ^ 0x3) == "\u{70}\u{6f}\u{77}")) and ((a .. a) == "\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")))
836assert((((a[0x3] == "\u{69}\u{6e}\u{64}\u{65}\u{78}") and ((a ^ 0x3) == "\u{70}\u{6f}\u{77}")) and ((a .. a) == "\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")))
837assert((((a / 0x3) == "\u{64}\u{69}\u{76}") and ((0x3 % a) == "\u{6d}\u{6f}\u{64}")))
837assert((((a / 0x3) == "\u{64}\u{69}\u{76}") and ((0x3 % a) == "\u{6d}\u{6f}\u{64}")))
838−assert((((((a + 0x3) == "\u{61}\u{64}\u{64}") and ((0x3 - a) == "\u{73}\u{75}\u{62}")) and ((a * 0x3) == "\u{6d}\u{75}\u{6c}")) and - ((a == "\u{75}\u{6e}\u{6d}") and # ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))
838+assert((((((a + 0x3) == "\u{61}\u{64}\u{64}") and ((0x3 - a) == "\u{73}\u{75}\u{62}")) and ((a * 0x3) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
839−assert((((((a + 0x7530) == "\u{61}\u{64}\u{64}") and ((a - 3.0) == "\u{73}\u{75}\u{62}")) and ((a * 3.0) == "\u{6d}\u{75}\u{6c}")) and - ((a == "\u{75}\u{6e}\u{6d}") and # ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))
839+assert((((((a + 0x7530) == "\u{61}\u{64}\u{64}") and ((a - 3.0) == "\u{73}\u{75}\u{62}")) and ((a * 3.0) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
840assert((((((a | 0x3) == "\u{62}\u{6f}\u{72}") and ((0x3 ~ a) == "\u{62}\u{78}\u{6f}\u{72}")) and ((a << 0x3) == "\u{73}\u{68}\u{6c}")) and ((a >> 0x1) == "\u{73}\u{68}\u{72}")))
840assert((((((a | 0x3) == "\u{62}\u{6f}\u{72}") and ((0x3 ~ a) == "\u{62}\u{78}\u{6f}\u{72}")) and ((a << 0x3) == "\u{73}\u{68}\u{6c}")) and ((a >> 0x1) == "\u{73}\u{68}\u{72}")))
841assert(((a == b) and (a.op == "\u{65}\u{71}")))
841assert(((a == b) and (a.op == "\u{65}\u{71}")))
842assert(((a >= b) and (a.op == "\u{6c}\u{65}")))
842assert(((a >= b) and (a.op == "\u{6c}\u{65}")))
843assert((("\u{78}" >= a) and (a.op == "\u{6c}\u{65}")))
843assert((("\u{78}" >= a) and (a.op == "\u{6c}\u{65}")))
844assert(((a > b) and (a.op == "\u{6c}\u{74}")))
844assert(((a > b) and (a.op == "\u{6c}\u{74}")))
845assert(((a > 0xa) and (a.op == "\u{6c}\u{74}")))
845assert(((a > 0xa) and (a.op == "\u{6c}\u{74}")))
846−assert(~ (a == "\u{62}\u{6e}\u{6f}\u{74}"))
846+assert((~ (a == "\u{62}\u{6e}\u{6f}\u{74}")))
847do
847do
848local function f
848local function f
849()
849()
@@ -875,9 +875,9 @@ end
875local function deep
875local function deep
876(lvl,n)
876(lvl,n)
877if (lvl == 0x0) then
877if (lvl == 0x0) then
878−return (debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n))
878+return debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n)
879else
879else
880−return (deep((lvl - 0x1),n))
880+return deep((lvl - 0x1),n)
881end
881end
882end
882end
883local function checkdeep
883local function checkdeep
@@ -889,7 +889,7 @@ assert((cl <= ((0xa + 0xb) + 0x1)))
889local brk = string.find(rest,"\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{9}\u{25}\u{28}\u{73}\u{6b}\u{69}\u{70}")
889local brk = string.find(rest,"\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{9}\u{25}\u{28}\u{73}\u{6b}\u{69}\u{70}")
890if brk then
890if brk then
891local rest1 = string.sub(rest,0x1,brk)
891local rest1 = string.sub(rest,0x1,brk)
892−local rest2 = string.sub(rest,brk,# rest)
892+local rest2 = string.sub(rest,brk,(# rest))
893assert(((countlines(rest1) == 0xa) and (countlines(rest2) == 0xb)))
893assert(((countlines(rest1) == 0xa) and (countlines(rest2) == 0xb)))
894else
894else
895assert((cl == ((total - start) + 0x2)))
895assert((cl == ((total - start) + 0x2)))
@@ -930,14 +930,14 @@ local prog = "\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}
930local name = string.rep("\u{78}",0x3e8)
930local name = string.rep("\u{78}",0x3e8)
931local p = assert(load(prog,name))
931local p = assert(load(prog,name))
932local c = string.dump(p)
932local c = string.dump(p)
933−assert(# ((c > 0x3e8) and # (c < 0x7d0)))
933+assert((# ((c > 0x3e8) and (# (c < 0x7d0)))))
934local f = assert(load(c))
934local f = assert(load(c))
935local g = f()
935local g = f()
936local h = g(0x3)
936local h = g(0x3)
937assert((h(0x5) == 0x8))
937assert((h(0x5) == 0x8))
938assert((((debug.getinfo(f).source == name) and (debug.getinfo(g).source == name)) and (debug.getinfo(h).source == name)))
938assert((((debug.getinfo(f).source == name) and (debug.getinfo(g).source == name)) and (debug.getinfo(h).source == name)))
939local c = string.dump(p,true)
939local c = string.dump(p,true)
940−assert(# (c < 0x1f4))
940+assert((# (c < 0x1f4)))
941local f = assert(load(c))
941local f = assert(load(c))
942local g = f()
942local g = f()
943local h = g(0x1e)
943local h = g(0x1e)
desk/res/lua/cycled/errors.lua+28−28
@@ -6,12 +6,12 @@ mt.__index=nil
6local function checkerr
6local function checkerr
7(msg,f, ...)
7(msg,f, ...)
8local st,err = pcall(f,...)
8local st,err = pcall(f,...)
9−assert(not (st and string.find(err,msg)))
9+assert((not (st and string.find(err,msg))))
10end
10end
11local function doit
11local function doit
12(s)
12(s)
13local f,msg = load(s)
13local f,msg = load(s)
14−if not f then
14+if (not f) then
15return msg
15return msg
16end
16end
17local cond,msg = pcall(f)
17local cond,msg = pcall(f)
@@ -28,7 +28,7 @@ end
28local function checksyntax
28local function checksyntax
29(prog,extra,token,line)
29(prog,extra,token,line)
30local msg = doit(prog)
30local msg = doit(prog)
31−if not (string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}")) then
31+if (not (string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and (not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}")))) then
32token=("\u{27}" .. (token .. "\u{27}"))
32token=("\u{27}" .. (token .. "\u{27}"))
33end
33end
34token=string.gsub(token,"\u{28}\u{25}\u{70}\u{29}","\u{25}\u{25}\u{25}\u{31}")
34token=string.gsub(token,"\u{28}\u{25}\u{70}\u{29}","\u{25}\u{25}\u{25}\u{31}")
@@ -40,7 +40,7 @@ assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{68}\u{69}\u{27}\u{2c}
40assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{29}") == nil))
40assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{29}") == nil))
41assert(doit("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{6e}\u{3d}\u{32}\u{5e}\u{33}\u{30}\u{29}"))
41assert(doit("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{6e}\u{3d}\u{32}\u{5e}\u{33}\u{30}\u{29}"))
42assert(doit("\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{29}"))
42assert(doit("\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{29}"))
43−assert(not (doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}")))
43+assert((not (doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}"))))
44assert(doit("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{28}\u{29}"))
44assert(doit("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{28}\u{29}"))
45assert(doit("\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{61}"))
45assert(doit("\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{61}"))
46assert(doit("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{3b}\u{3b}"))
46assert(doit("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{3b}\u{3b}"))
@@ -60,7 +60,7 @@ end
60checksyntax("\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{a}\u{20}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}",0x1)
60checksyntax("\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{a}\u{20}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}",0x1)
61checksyntax("\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{41}\u{a}\u{20}\u{20}\u{20}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}","\u{6e}\u{6f}\u{20}\u{76}\u{69}\u{73}\u{69}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}",0x2)
61checksyntax("\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{41}\u{a}\u{20}\u{20}\u{20}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}","\u{6e}\u{6f}\u{20}\u{76}\u{69}\u{73}\u{69}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}",0x2)
62end
62end
63−if not T then
63+if (not T) then
64(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
64(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
65else
65else
66print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
66print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
@@ -78,7 +78,7 @@ a[i]=tostring(i)
78end
78end
79end)
79end)
80T.totalmem(0x0)
80T.totalmem(0x0)
81−assert(not (st and (msg == ("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))))
81+assert((not (st and (msg == ("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
82local res = T.testC("\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{31}\u{36}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{34}\u{20}\u{72}\u{65}\u{6d}\u{61}\u{69}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{20}\u{20}")
82local res = T.testC("\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{31}\u{36}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{34}\u{20}\u{72}\u{65}\u{6d}\u{61}\u{69}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{20}\u{20}")
83assert(string.find(res,"\u{78}\u{75}\u{78}\u{75}\u{2e}\u{2d}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
83assert(string.find(res,"\u{78}\u{75}\u{78}\u{75}\u{2e}\u{2d}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
84end
84end
@@ -89,7 +89,7 @@ checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{20}\u{3c}\u{3d}\u{20}\u{31}
89checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{33}\u{29}\u{2b}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
89checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{33}\u{29}\u{2b}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
90checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{3a}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
90checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{3a}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
91checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
91checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
92−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}"))
92+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")))
93checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}","\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
93checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}","\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
94checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{28}\u{31}\u{29}\u{2e}\u{2e}\u{7b}\u{7d}","\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
94checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{28}\u{31}\u{29}\u{2e}\u{2e}\u{7b}\u{7d}","\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
95checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{61}\u{2e}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{78}\u{20}\u{2b}\u{20}\u{31}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{78}\u{27}")
95checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{61}\u{2e}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{78}\u{20}\u{2b}\u{20}\u{31}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{78}\u{27}")
@@ -106,7 +106,7 @@ checkmessage("\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}
106checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
106checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
107checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{64}\u{64}\u{64}\u{27}")
107checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{64}\u{64}\u{64}\u{27}")
108checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{2b}\u{31}\u{2e}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{62}\u{27}")
108checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{2b}\u{31}\u{2e}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{62}\u{27}")
109−assert(not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}"))
109+assert((not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}")))
110checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{63}\u{63}\u{5b}\u{31}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{63}\u{63}\u{27}")
110checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{63}\u{63}\u{5b}\u{31}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{63}\u{63}\u{27}")
111checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{2e}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{61}\u{27}")
111checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{2e}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{61}\u{27}")
112checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{61}\u{27}")
112checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{61}\u{27}")
@@ -118,8 +118,8 @@ checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}
118checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{2c}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{2c}\u{33}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{62}\u{28}\u{31}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{28}\u{33}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
118checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{2c}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{2c}\u{33}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{62}\u{28}\u{31}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{28}\u{33}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
119checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{2c}\u{66}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{66}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{66}\u{27}")
119checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{2c}\u{66}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{66}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{66}\u{27}")
120checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}\u{28}\u{29}","\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{61}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
120checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}\u{28}\u{29}","\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{61}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
121−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
121+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
122−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
122+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
123checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
123checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
124checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}","\u{74}\u{77}\u{6f}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}")
124checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}","\u{74}\u{77}\u{6f}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}")
125checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{31}\u{30}\u{27}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
125checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{31}\u{30}\u{27}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
@@ -256,7 +256,7 @@ local function lineerror
256(s,l)
256(s,l)
257local err,msg = pcall(load(s))
257local err,msg = pcall(load(s))
258local line = tonumber(string.match(msg,"\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}"))
258local line = tonumber(string.match(msg,"\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}"))
259−assert(((line == l) or (not (line and not l))))
259+assert(((line == l) or (not (line and (not l)))))
260end
260end
261lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{27}\u{61}\u{27}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{69}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x2)
261lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{27}\u{61}\u{27}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{69}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x2)
262lineerror("\u{a}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x3)
262lineerror("\u{a}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x3)
@@ -272,16 +272,16 @@ lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{
272local p = "\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{67}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{61}\u{27}\u{2c}\u{20}\u{58}\u{58}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{67}\u{28}\u{29}\u{a}"
272local p = "\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{67}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{61}\u{27}\u{2c}\u{20}\u{58}\u{58}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{67}\u{28}\u{29}\u{a}"
273XX=0x3
273XX=0x3
274;
274;
275−lineerror((p),0x3)
275+lineerror(p,0x3)
276XX=0x0
276XX=0x0
277;
277;
278−lineerror((p),false)
278+lineerror(p,false)
279XX=0x1
279XX=0x1
280;
280;
281−lineerror((p),0x2)
281+lineerror(p,0x2)
282XX=0x2
282XX=0x2
283;
283;
284−lineerror((p),0x1)
284+lineerror(p,0x1)
285_G.XX,_G.g,_G.f=nil
285_G.XX,_G.g,_G.f=nil
286lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{65}\u{6e}\u{64}",0x3)
286lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{65}\u{6e}\u{64}",0x3)
287lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}",0x5)
287lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}",0x5)
@@ -290,7 +290,7 @@ do
290local s = string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{5f}\u{41}\u{2e}\u{78}",string.rep("\u{a}",0x12c))
290local s = string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{5f}\u{41}\u{2e}\u{78}",string.rep("\u{a}",0x12c))
291lineerror(s,0x12d)
291lineerror(s,0x12d)
292end
292end
293−if not _soft then
293+if (not _soft) then
294collectgarbage()
294collectgarbage()
295print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
295print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
296local C = 0x0
296local C = 0x0
@@ -310,7 +310,7 @@ local function checkstackmessage
310(m)
310(m)
311print(("\u{28}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}" .. (C .. "\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{29}")))
311print(("\u{28}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}" .. (C .. "\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{29}")))
312C=0x0
312C=0x0
313−return (string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
313+return string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
314end
314end
315assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
315assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
316assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
316assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
@@ -341,7 +341,7 @@ i=(i + 0x1)
341end
341end
342assert((i > 0xf))
342assert((i > 0xf))
343local res,msg = xpcall(error,error)
343local res,msg = xpcall(error,error)
344−assert(not (res and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
344+assert((not (res and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))))
345print("\u{2b}")
345print("\u{2b}")
346local function f
346local function f
347(x)
347(x)
@@ -380,11 +380,11 @@ local t = {}
380local res,msg = pcall(function ()
380local res,msg = pcall(function ()
381error(t)
381error(t)
382end)
382end)
383−assert(not (res and (msg == t)))
383+assert((not (res and (msg == t))))
384res,msg=pcall(function ()
384res,msg=pcall(function ()
385error(nil)
385error(nil)
386end)
386end)
387−assert(not (res and (msg == nil)))
387+assert((not (res and (msg == nil))))
388local function f
388local function f
389()
389()
390error({["\u{6d}\u{73}\u{67}"] = "\u{78}"})
390error({["\u{6d}\u{73}\u{67}"] = "\u{78}"})
@@ -394,25 +394,25 @@ return {["\u{6d}\u{73}\u{67}"] = (r.msg .. "\u{79}")}
394end)
394end)
395assert((msg.msg == "\u{78}\u{79}"))
395assert((msg.msg == "\u{78}\u{79}"))
396res,msg=pcall(assert,false,"\u{58}",t)
396res,msg=pcall(assert,false,"\u{58}",t)
397−assert(not (res and (msg == "\u{58}")))
397+assert((not (res and (msg == "\u{58}"))))
398res,msg=pcall(function ()
398res,msg=pcall(function ()
399assert(false)
399assert(false)
400end)
400end)
401local line = string.match(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{65}\u{64}\u{21}\u{24}")
401local line = string.match(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{65}\u{64}\u{21}\u{24}")
402assert((tonumber(line) == (debug.getinfo(0x1,"\u{6c}").currentline - 0x2)))
402assert((tonumber(line) == (debug.getinfo(0x1,"\u{6c}").currentline - 0x2)))
403res,msg=pcall(assert,false,t)
403res,msg=pcall(assert,false,t)
404−assert(not (res and (msg == t)))
404+assert((not (res and (msg == t))))
405res,msg=pcall(assert,nil,nil)
405res,msg=pcall(assert,nil,nil)
406−assert(not (res and (msg == nil)))
406+assert((not (res and (msg == nil))))
407res,msg=pcall(assert)
407res,msg=pcall(assert)
408−assert(not (res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}")))
408+assert((not (res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}"))))
409end
409end
410local a,b,c = xpcall(string.find,error,"\u{61}\u{6c}\u{6f}","\u{61}\u{6c}")
410local a,b,c = xpcall(string.find,error,"\u{61}\u{6c}\u{6f}","\u{61}\u{6c}")
411assert(((a and (b == 0x1)) and (c == 0x2)))
411assert(((a and (b == 0x1)) and (c == 0x2)))
412a,b,c=xpcall(string.find,function (x)
412a,b,c=xpcall(string.find,function (x)
413return {}
413return {}
414end,true,"\u{61}\u{6c}")
414end,true,"\u{61}\u{6c}")
415−assert(not ((a and (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (c == nil)))
415+assert((not ((a and (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (c == nil))))
416print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{6b}\u{65}\u{6e}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}")
416print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{6b}\u{65}\u{6e}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}")
417checksyntax("\u{73}\u{79}\u{6e}\u{74}\u{61}\u{78}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}","","\u{65}\u{72}\u{72}\u{6f}\u{72}",0x1)
417checksyntax("\u{73}\u{79}\u{6e}\u{74}\u{61}\u{78}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}","","\u{65}\u{72}\u{72}\u{6f}\u{72}",0x1)
418checksyntax("\u{31}\u{2e}\u{30}\u{30}\u{30}","","\u{31}\u{2e}\u{30}\u{30}\u{30}",0x1)
418checksyntax("\u{31}\u{2e}\u{30}\u{30}\u{30}","","\u{31}\u{2e}\u{30}\u{30}\u{30}",0x1)
@@ -423,7 +423,7 @@ checksyntax("\u{66}\u{6f}\u{72}\u{20}\u{3e}\u{3e}\u{20}\u{64}\u{6f}\u{20}\u{65}\
423checksyntax("\u{61}\u{1}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{31}\u{3e}",0x1)
423checksyntax("\u{61}\u{1}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{31}\u{3e}",0x1)
424checksyntax("\u{ff}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{32}\u{35}\u{35}\u{3e}",0x1)
424checksyntax("\u{ff}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{32}\u{35}\u{35}\u{3e}",0x1)
425doit("\u{49}\u{20}\u{3d}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{22}\u{61}\u{3d}\u{39}\u{2b}\u{22}\u{29}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{33}")
425doit("\u{49}\u{20}\u{3d}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{22}\u{61}\u{3d}\u{39}\u{2b}\u{22}\u{29}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{33}")
426−assert(((_G.aaa == 0x3) and not _G.I))
426+assert(((_G.aaa == 0x3) and (not _G.I)))
427_G.I,_G.aaa=nil
427_G.I,_G.aaa=nil
428print("\u{2b}")
428print("\u{2b}")
429local lim = 0x3e8
429local lim = 0x3e8
@@ -440,12 +440,12 @@ local function testrep
440local s = (init .. (string.rep(rep,0x64) .. (close .. string.rep(repc,0x64))))
440local s = (init .. (string.rep(rep,0x64) .. (close .. string.rep(repc,0x64))))
441local res,msg = load(s)
441local res,msg = load(s)
442assert(res)
442assert(res)
443−if (finalresult) then
443+if finalresult then
444assert((res() == finalresult))
444assert((res() == finalresult))
445end
445end
446s=(init .. string.rep(rep,0x1f4))
446s=(init .. string.rep(rep,0x1f4))
447local res,msg = load(s)
447local res,msg = load(s)
448−assert(not (res and (string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
448+assert((not (res and (string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))))
449end
449end
450testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}","\u{2c}\u{61}","\u{3d}\u{20}\u{31}","\u{2c}\u{31}")
450testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}","\u{2c}\u{61}","\u{3d}\u{20}\u{31}","\u{2c}\u{31}")
451testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}\u{3d}","\u{7b}","\u{30}","\u{7d}")
451testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}\u{3d}","\u{7b}","\u{30}","\u{7d}")
desk/res/lua/cycled/events.lua+49−49
@@ -31,7 +31,7 @@ assert((setmetatable(a,nil) == a))
31assert((getmetatable(a) == nil))
31assert((getmetatable(a) == nil))
32assert((setmetatable(a,t) == a))
32assert((setmetatable(a,t) == a))
33function f(t,i,e)
33function f(t,i,e)
34−assert(not e)
34+assert((not e))
35local p = rawget(t,"\u{70}\u{61}\u{72}\u{65}\u{6e}\u{74}")
35local p = rawget(t,"\u{70}\u{61}\u{72}\u{65}\u{6e}\u{74}")
36return (p and (p[i] + 0x3)),"\u{64}\u{75}\u{6d}\u{6d}\u{79}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"
36return (p and (p[i] + 0x3)),"\u{64}\u{75}\u{6d}\u{6d}\u{79}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"
37end
37end
@@ -109,12 +109,12 @@ foi=false
109;
109;
110a[0x1]=0x0
110a[0x1]=0x0
111;
111;
112−assert(not foi)
112+assert((not foi))
113foi=false
113foi=false
114;
114;
115a["\u{61}\u{31}"]=0x0
115a["\u{61}\u{31}"]=0x0
116;
116;
117−assert(not foi)
117+assert((not foi))
118foi=false
118foi=false
119;
119;
120a["\u{61}\u{31}\u{31}"]=0x0
120a["\u{61}\u{31}\u{31}"]=0x0
@@ -129,7 +129,7 @@ foi=false
129;
129;
130a[0x1]=undef
130a[0x1]=undef
131;
131;
132−assert(not foi)
132+assert((not foi))
133a[0x1]=undef
133a[0x1]=undef
134foi=false
134foi=false
135;
135;
@@ -154,7 +154,7 @@ function f(op)
154return function (...)
154return function (...)
155cap={[0x0] = op,...}
155cap={[0x0] = op,...}
156;
156;
157−return (...)
157+return ...
158end
158end
159end
159end
160t.__add=f("\u{61}\u{64}\u{64}")
160t.__add=f("\u{61}\u{64}\u{64}")
@@ -176,8 +176,8 @@ t.__lt=f("\u{6c}\u{74}")
176t.__le=f("\u{6c}\u{65}")
176t.__le=f("\u{6c}\u{65}")
177local function checkcap
177local function checkcap
178(t)
178(t)
179−assert(# ((cap + 0x1) == # t))
179+assert((# ((cap + 0x1) == (# t))))
180−for i = 0x1, # t
180+for i = 0x1, (# t)
181do
181do
182assert((cap[(i - 0x1)] == t[i]))
182assert((cap[(i - 0x1)] == t[i]))
183assert((math.type(cap[(i - 0x1)]) == math.type(t[i])))
183assert((math.type(cap[(i - 0x1)]) == math.type(t[i])))
@@ -254,7 +254,7 @@ assert(((0xa ~ a) == 0xa))
254end)()
254end)()
255;
255;
256checkcap({"\u{62}\u{78}\u{6f}\u{72}",0xa,a})
256checkcap({"\u{62}\u{78}\u{6f}\u{72}",0xa,a})
257−assert(- (a == a))
257+assert((- (a == a)))
258;
258;
259checkcap({"\u{75}\u{6e}\u{6d}",a,a})
259checkcap({"\u{75}\u{6e}\u{6d}",a,a})
260assert(((a ^ 4.0) == a))
260assert(((a ^ 4.0) == a))
@@ -269,10 +269,10 @@ checkcap({"\u{70}\u{6f}\u{77}",0x4,a})
269assert((("\u{34}" ^ a) == "\u{34}"))
269assert((("\u{34}" ^ a) == "\u{34}"))
270;
270;
271checkcap({"\u{70}\u{6f}\u{77}","\u{34}",a})
271checkcap({"\u{70}\u{6f}\u{77}","\u{34}",a})
272−assert(# (a == a))
272+assert((# (a == a)))
273;
273;
274checkcap({"\u{6c}\u{65}\u{6e}",a,a})
274checkcap({"\u{6c}\u{65}\u{6e}",a,a})
275−assert(~ (a == a))
275+assert((~ (a == a)))
276;
276;
277checkcap({"\u{62}\u{6e}\u{6f}\u{74}",a,a})
277checkcap({"\u{62}\u{6e}\u{6f}\u{74}",a,a})
278assert(((a << 0x3) == a))
278assert(((a << 0x3) == a))
@@ -287,20 +287,20 @@ checkcap({"\u{6c}\u{74}",a,5.0})
287assert((a >= 0xa))
287assert((a >= 0xa))
288;
288;
289checkcap({"\u{6c}\u{65}",0xa,a})
289checkcap({"\u{6c}\u{65}",0xa,a})
290−assert((a <= - 10.0))
290+assert((a <= (- 10.0)))
291;
291;
292−checkcap({"\u{6c}\u{65}",a,- 10.0})
292+checkcap({"\u{6c}\u{65}",a,(- 10.0)})
293−assert((a < - 0xa))
293+assert((a < (- 0xa)))
294;
294;
295−checkcap({"\u{6c}\u{74}",a,- 0xa})
295+checkcap({"\u{6c}\u{74}",a,(- 0xa)})
296t=setmetatable({0x1,0x2,0x3},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
296t=setmetatable({0x1,0x2,0x3},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
297return 0xa
297return 0xa
298end})
298end})
299−assert(# ((t == 0xa) and (rawlen(t) == 0x3)))
299+assert((# ((t == 0xa) and (rawlen(t) == 0x3))))
300assert((rawlen("\u{61}\u{62}\u{63}") == 0x3))
300assert((rawlen("\u{61}\u{62}\u{63}") == 0x3))
301−assert(not pcall(rawlen,io.stdin))
301+assert((not pcall(rawlen,io.stdin)))
302−assert(not pcall(rawlen,0x22))
302+assert((not pcall(rawlen,0x22)))
303−assert(not pcall(rawlen))
303+assert((not pcall(rawlen)))
304assert((rawlen(string.rep("\u{61}",0x3e8)) == 0x3e8))
304assert((rawlen(string.rep("\u{61}",0x3e8)) == 0x3e8))
305t={}
305t={}
306t.__lt=function (a,b,c)
306t.__lt=function (a,b,c)
@@ -339,18 +339,18 @@ return setmetatable({["\u{78}"] = x},t)
339end
339end
340local function test
340local function test
341(a,b,c)
341(a,b,c)
342−assert(not (((Op(0x1) < Op(0x1)) and (Op(0x1) < Op(0x2))) and not (Op(0x2) < Op(0x1))))
342+assert((not (((Op(0x1) < Op(0x1)) and (Op(0x1) < Op(0x2))) and (not (Op(0x2) < Op(0x1))))))
343−assert(not (((0x1 < Op(0x1)) and (Op(0x1) < 0x2)) and not (0x2 < Op(0x1))))
343+assert((not (((0x1 < Op(0x1)) and (Op(0x1) < 0x2)) and (not (0x2 < Op(0x1))))))
344−assert(not (((Op("\u{61}") < Op("\u{61}")) and (Op("\u{61}") < Op("\u{62}"))) and not (Op("\u{62}") < Op("\u{61}"))))
344+assert((not (((Op("\u{61}") < Op("\u{61}")) and (Op("\u{61}") < Op("\u{62}"))) and (not (Op("\u{62}") < Op("\u{61}"))))))
345−assert(not ((("\u{61}" < Op("\u{61}")) and (Op("\u{61}") < "\u{62}")) and not (Op("\u{62}") < Op("\u{61}"))))
345+assert((not ((("\u{61}" < Op("\u{61}")) and (Op("\u{61}") < "\u{62}")) and (not (Op("\u{62}") < Op("\u{61}"))))))
346−assert((((Op(0x1) <= Op(0x1)) and (Op(0x1) <= Op(0x2))) and not (Op(0x2) <= Op(0x1))))
346+assert((((Op(0x1) <= Op(0x1)) and (Op(0x1) <= Op(0x2))) and (not (Op(0x2) <= Op(0x1)))))
347−assert((((Op("\u{61}") <= Op("\u{61}")) and (Op("\u{61}") <= Op("\u{62}"))) and not (Op("\u{62}") <= Op("\u{61}"))))
347+assert((((Op("\u{61}") <= Op("\u{61}")) and (Op("\u{61}") <= Op("\u{62}"))) and (not (Op("\u{62}") <= Op("\u{61}")))))
348−assert(not ((Op(0x1) > Op(0x1)) and not ((Op(0x1) > Op(0x2)) and (Op(0x2) > Op(0x1)))))
348+assert((not ((Op(0x1) > Op(0x1)) and (not ((Op(0x1) > Op(0x2)) and (Op(0x2) > Op(0x1)))))))
349−assert(not ((Op("\u{61}") > Op("\u{61}")) and not ((Op("\u{61}") > Op("\u{62}")) and (Op("\u{62}") > Op("\u{61}")))))
349+assert((not ((Op("\u{61}") > Op("\u{61}")) and (not ((Op("\u{61}") > Op("\u{62}")) and (Op("\u{62}") > Op("\u{61}")))))))
350−assert(((Op(0x1) >= Op(0x1)) and not ((Op(0x1) >= Op(0x2)) and (Op(0x2) >= Op(0x1)))))
350+assert(((Op(0x1) >= Op(0x1)) and (not ((Op(0x1) >= Op(0x2)) and (Op(0x2) >= Op(0x1))))))
351−assert(((0x1 >= Op(0x1)) and not ((0x1 >= Op(0x2)) and (Op(0x2) >= 0x1))))
351+assert(((0x1 >= Op(0x1)) and (not ((0x1 >= Op(0x2)) and (Op(0x2) >= 0x1)))))
352−assert(((Op("\u{61}") >= Op("\u{61}")) and not ((Op("\u{61}") >= Op("\u{62}")) and (Op("\u{62}") >= Op("\u{61}")))))
352+assert(((Op("\u{61}") >= Op("\u{61}")) and (not ((Op("\u{61}") >= Op("\u{62}")) and (Op("\u{62}") >= Op("\u{61}"))))))
353−assert((("\u{61}" >= Op("\u{61}")) and not ((Op("\u{61}") >= "\u{62}") and (Op("\u{62}") >= Op("\u{61}")))))
353+assert((("\u{61}" >= Op("\u{61}")) and (not ((Op("\u{61}") >= "\u{62}") and (Op("\u{62}") >= Op("\u{61}"))))))
354assert(((Op(0x1) == Op(0x1)) and (Op(0x1) ~= Op(0x2))))
354assert(((Op(0x1) == Op(0x1)) and (Op(0x1) ~= Op(0x2))))
355assert(((Op("\u{61}") == Op("\u{61}")) and (Op("\u{61}") ~= Op("\u{62}"))))
355assert(((Op("\u{61}") == Op("\u{61}")) and (Op("\u{61}") ~= Op("\u{62}"))))
356assert(((a == a) and (a ~= b)))
356assert(((a == a) and (a ~= b)))
@@ -373,7 +373,7 @@ end
373t.__lt=function (a,b)
373t.__lt=function (a,b)
374for k in pairs(a)
374for k in pairs(a)
375do
375do
376−if not b[k] then
376+if (not b[k]) then
377return false
377return false
378end
378end
379b[k]=undef
379b[k]=undef
@@ -383,23 +383,23 @@ end
383t.__le=function (a,b)
383t.__le=function (a,b)
384for k in pairs(a)
384for k in pairs(a)
385do
385do
386−if not b[k] then
386+if (not b[k]) then
387return false
387return false
388end
388end
389end
389end
390return true
390return true
391end
391end
392assert((Set({0x1,0x2,0x3}) < Set({0x1,0x2,0x3,0x4})))
392assert((Set({0x1,0x2,0x3}) < Set({0x1,0x2,0x3,0x4})))
393−assert(not (Set({0x1,0x2,0x3,0x4}) < Set({0x1,0x2,0x3,0x4})))
393+assert((not (Set({0x1,0x2,0x3,0x4}) < Set({0x1,0x2,0x3,0x4}))))
394assert((Set({0x1,0x2,0x3,0x4}) <= Set({0x1,0x2,0x3,0x4})))
394assert((Set({0x1,0x2,0x3,0x4}) <= Set({0x1,0x2,0x3,0x4})))
395assert((Set({0x1,0x2,0x3,0x4}) >= Set({0x1,0x2,0x3,0x4})))
395assert((Set({0x1,0x2,0x3,0x4}) >= Set({0x1,0x2,0x3,0x4})))
396−assert(not (Set({0x1,0x3}) <= Set({0x3,0x5})))
396+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
397−assert(not (Set({0x1,0x3}) <= Set({0x3,0x5})))
397+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
398−assert(not (Set({0x1,0x3}) >= Set({0x3,0x5})))
398+assert((not (Set({0x1,0x3}) >= Set({0x3,0x5}))))
399t.__eq=function (a,b)
399t.__eq=function (a,b)
400for k in pairs(a)
400for k in pairs(a)
401do
401do
402−if not b[k] then
402+if (not b[k]) then
403return false
403return false
404end
404end
405b[k]=undef
405b[k]=undef
@@ -408,7 +408,7 @@ return (next(b) == nil)
408end
408end
409local s = Set({0x1,0x3,0x5})
409local s = Set({0x1,0x3,0x5})
410assert((s == Set({0x3,0x5,0x1})))
410assert((s == Set({0x3,0x5,0x1})))
411−assert(not rawequal(s,Set({0x3,0x5,0x1})))
411+assert((not rawequal(s,Set({0x3,0x5,0x1}))))
412assert(rawequal(s,s))
412assert(rawequal(s,s))
413assert((Set({0x1,0x3,0x5,0x1}) == rawSet({0x3,0x5,0x1})))
413assert((Set({0x1,0x3,0x5,0x1}) == rawSet({0x3,0x5,0x1})))
414assert((rawSet({0x1,0x3,0x5,0x1}) == Set({0x3,0x5,0x1})))
414assert((rawSet({0x1,0x3,0x5,0x1}) == Set({0x3,0x5,0x1})))
@@ -426,7 +426,7 @@ return (x[0x1] == y[0x1])
426end
426end
427assert((a == b))
427assert((a == b))
428end
428end
429−if not T then
429+if (not T) then
430(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
430(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
431else
431else
432local u1 = T.newuserdata(0x0,0x1)
432local u1 = T.newuserdata(0x0,0x1)
@@ -448,7 +448,7 @@ end})
448assert((((u1 == u3) and (u3 == u1)) and (u1 ~= u2)))
448assert((((u1 == u3) and (u3 == u1)) and (u1 ~= u2)))
449assert((((u2 == u1) and (u2 == u3)) and (u3 == u2)))
449assert((((u2 == u1) and (u2 == u3)) and (u3 == u2)))
450assert((u2 ~= {}))
450assert((u2 ~= {}))
451−assert((rawequal(u1,u1) and not rawequal(u1,u3)))
451+assert((rawequal(u1,u1) and (not rawequal(u1,u3))))
452local mirror = {}
452local mirror = {}
453debug.setmetatable(u3,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror})
453debug.setmetatable(u3,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror})
454for i = 0x1, 0xa
454for i = 0x1, 0xa
@@ -514,12 +514,12 @@ t1.__le=function ()
514return false
514return false
515end
515end
516setmetatable(d,t1)
516setmetatable(d,t1)
517−assert((((c == d) and (c < d)) and not (d <= c)))
517+assert((((c == d) and (c < d)) and (not (d <= c))))
518t2={}
518t2={}
519t2.__eq=t1.__eq
519t2.__eq=t1.__eq
520t2.__lt=t1.__lt
520t2.__lt=t1.__lt
521setmetatable(d,t2)
521setmetatable(d,t2)
522−assert((((c == d) and (c < d)) and not (d <= c)))
522+assert((((c == d) and (c < d)) and (not (d <= c))))
523local i
523local i
524local tt = {["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = function (t, ...)
524local tt = {["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = function (t, ...)
525i=(i + 0x1)
525i=(i + 0x1)
@@ -552,12 +552,12 @@ end,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (x)
552return math.floor(x)
552return math.floor(x)
553end}
553end}
554debug.setmetatable(0xa,mt)
554debug.setmetatable(0xa,mt)
555−assert((getmetatable(- 0x2) == mt))
555+assert((getmetatable((- 0x2)) == mt))
556assert(((0xa)[0x3] == 0xd))
556assert(((0xa)[0x3] == 0xd))
557assert(((0xa)["\u{33}"] == 0xd))
557assert(((0xa)["\u{33}"] == 0xd))
558−assert(# (3.45 == 0x3))
558+assert((# (3.45 == 0x3)))
559debug.setmetatable(0x17,nil)
559debug.setmetatable(0x17,nil)
560−assert((getmetatable(- 0x2) == nil))
560+assert((getmetatable((- 0x2)) == nil))
561debug.setmetatable(true,mt)
561debug.setmetatable(true,mt)
562assert((getmetatable(false) == mt))
562assert((getmetatable(false) == mt))
563mt.__index=function (a,b)
563mt.__index=function (a,b)
@@ -585,12 +585,12 @@ setmetatable(a,a)
585a.__index=a
585a.__index=a
586;
586;
587a.__newindex=a
587a.__newindex=a
588−assert(not pcall(function (a,b)
588+assert((not pcall(function (a,b)
589return a[b]
589return a[b]
590−end,a,0xa))
590+end,a,0xa)))
591−assert(not pcall(function (a,b,c)
591+assert((not pcall(function (a,b,c)
592a[b]=c
592a[b]=c
593−end,a,0xa,true))
593+end,a,0xa,true)))
594T,K,V=nil
594T,K,V=nil
595grandparent={}
595grandparent={}
596grandparent.__newindex=function (t,k,v)
596grandparent.__newindex=function (t,k,v)
desk/res/lua/cycled/files.lua+74−74
@@ -2,7 +2,7 @@ local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
2local maxint = math.maxinteger
2local maxint = math.maxinteger
3assert((type(os.getenv("\u{50}\u{41}\u{54}\u{48}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
3assert((type(os.getenv("\u{50}\u{41}\u{54}\u{48}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
4assert((io.input(io.stdin) == io.stdin))
4assert((io.input(io.stdin) == io.stdin))
5−assert(not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
5+assert((not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
6assert((io.output(io.stdout) == io.stdout))
6assert((io.output(io.stdout) == io.stdout))
7local function testerr
7local function testerr
8(msg,f, ...)
8(msg,f, ...)
@@ -13,23 +13,23 @@ local function checkerr
13(msg,f, ...)
13(msg,f, ...)
14assert(testerr(msg,f,...))
14assert(testerr(msg,f,...))
15end
15end
16−assert(not (io.close(io.stdin) and not (io.stdout:close() and not io.stderr:close())))
16+assert((not (io.close(io.stdin) and (not (io.stdout:close() and (not io.stderr:close()))))))
17checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}",io.stdin.close)
17checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}",io.stdin.close)
18assert(((type(io.input()) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.output()) == "\u{66}\u{69}\u{6c}\u{65}")))
18assert(((type(io.input()) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.output()) == "\u{66}\u{69}\u{6c}\u{65}")))
19assert(((type(io.stdin) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.stderr) == "\u{66}\u{69}\u{6c}\u{65}")))
19assert(((type(io.stdin) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.stderr) == "\u{66}\u{69}\u{6c}\u{65}")))
20−assert(not io.type(0x8))
20+assert((not io.type(0x8)))
21local a = {}
21local a = {}
22;
22;
23setmetatable(a,{})
23setmetatable(a,{})
24−assert(not io.type(a))
24+assert((not io.type(a)))
25assert((getmetatable(io.input()).__name == "\u{46}\u{49}\u{4c}\u{45}\u{2a}"))
25assert((getmetatable(io.input()).__name == "\u{46}\u{49}\u{4c}\u{45}\u{2a}"))
26local a,b,c = io.open("\u{78}\u{75}\u{78}\u{75}\u{5f}\u{6e}\u{61}\u{6f}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}")
26local a,b,c = io.open("\u{78}\u{75}\u{78}\u{75}\u{5f}\u{6e}\u{61}\u{6f}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}")
27−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
27+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
28a,b,c=io.open("\u{2f}\u{61}\u{2f}\u{62}\u{2f}\u{63}\u{2f}\u{64}","\u{77}")
28a,b,c=io.open("\u{2f}\u{61}\u{2f}\u{62}\u{2f}\u{63}\u{2f}\u{64}","\u{77}")
29−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
29+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
30local file = os.tmpname()
30local file = os.tmpname()
31local f,msg = io.open(file,"\u{77}")
31local f,msg = io.open(file,"\u{77}")
32−if not f then
32+if (not f) then
33(Message or print)("\u{27}\u{6f}\u{73}\u{2e}\u{74}\u{6d}\u{70}\u{6e}\u{61}\u{6d}\u{65}\u{27}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{3b}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
33(Message or print)("\u{27}\u{6f}\u{73}\u{2e}\u{74}\u{6d}\u{70}\u{6e}\u{61}\u{6d}\u{65}\u{27}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{3b}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
34else
34else
35f:close()
35f:close()
@@ -50,18 +50,18 @@ io.input(io.stdin)
50io.output(io.stdout)
50io.output(io.stdout)
51;
51;
52os.remove(file)
52os.remove(file)
53−assert(not loadfile(file))
53+assert((not loadfile(file)))
54checkerr("",dofile,file)
54checkerr("",dofile,file)
55−assert(not io.open(file))
55+assert((not io.open(file)))
56io.output(file)
56io.output(file)
57assert((io.output() ~= io.stdout))
57assert((io.output() ~= io.stdout))
58−if not _port then
58+if (not _port) then
59local status,msg,code = io.stdin:seek("\u{73}\u{65}\u{74}",0x3e8)
59local status,msg,code = io.stdin:seek("\u{73}\u{65}\u{74}",0x3e8)
60−assert(not ((status and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
60+assert((not ((status and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
61end
61end
62assert((io.output():seek() == 0x0))
62assert((io.output():seek() == 0x0))
63assert((io.write("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"):seek() == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}")))
63assert((io.write("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"):seek() == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}")))
64−assert((io.output():seek("\u{63}\u{75}\u{72}",- 0x3) == (string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 0x3)))
64+assert((io.output():seek("\u{63}\u{75}\u{72}",(- 0x3)) == (string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 0x3)))
65assert(io.write("\u{6a}\u{6f}\u{61}\u{6f}"))
65assert(io.write("\u{6a}\u{6f}\u{61}\u{6f}"))
66assert((io.output():seek("\u{65}\u{6e}\u{64}") == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{61}\u{6f}")))
66assert((io.output():seek("\u{65}\u{6e}\u{64}") == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{61}\u{6f}")))
67assert((io.output():seek("\u{73}\u{65}\u{74}") == 0x0))
67assert((io.output():seek("\u{73}\u{65}\u{74}") == 0x0))
@@ -85,7 +85,7 @@ end
85io.input():close()
85io.input():close()
86io.close()
86io.close()
87assert(os.rename(file,otherfile))
87assert(os.rename(file,otherfile))
88−assert(not os.rename(file,otherfile))
88+assert((not os.rename(file,otherfile)))
89io.output(io.open(otherfile,"\u{61}\u{62}"))
89io.output(io.open(otherfile,"\u{61}\u{62}"))
90assert(io.write("\u{a}\u{a}\u{9}\u{9}\u{20}\u{20}",0xd7a,"\u{a}"))
90assert(io.write("\u{a}\u{a}\u{9}\u{9}\u{20}\u{20}",0xd7a,"\u{a}"))
91;
91;
@@ -105,8 +105,8 @@ f:write(maxint,"\u{a}")
105f:write(string.format("\u{30}\u{58}\u{25}\u{78}\u{a}",maxint))
105f:write(string.format("\u{30}\u{58}\u{25}\u{78}\u{a}",maxint))
106f:write("\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
106f:write("\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
107f:write(0x0,"\u{a}")
107f:write(0x0,"\u{a}")
108−f:write(- maxint,"\u{a}")
108+f:write((- maxint),"\u{a}")
109−f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",- maxint))
109+f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",(- maxint)))
110f:write("\u{2d}\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
110f:write("\u{2d}\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
111assert(f:close())
111assert(f:close())
112local f <close> = assert(io.open(file,"\u{72}"))
112local f <close> = assert(io.open(file,"\u{72}"))
@@ -114,9 +114,9 @@ assert((f:read("\u{6e}") == maxint))
114assert((f:read("\u{6e}") == maxint))
114assert((f:read("\u{6e}") == maxint))
115assert((f:read("\u{6e}") == 343.5))
115assert((f:read("\u{6e}") == 343.5))
116assert((f:read("\u{6e}") == 0x0))
116assert((f:read("\u{6e}") == 0x0))
117−assert((f:read("\u{2a}\u{6e}") == - maxint))
117+assert((f:read("\u{2a}\u{6e}") == (- maxint)))
118−assert((f:read("\u{6e}") == - maxint))
118+assert((f:read("\u{6e}") == (- maxint)))
119−assert((f:read("\u{2a}\u{6e}") == - 343.5))
119+assert((f:read("\u{2a}\u{6e}") == (- 343.5)))
120end
120end
121assert(os.remove(file))
121assert(os.remove(file))
122do
122do
@@ -134,7 +134,7 @@ assert(((((((((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}") and (l2 == "\u
134assert(f:close())
134assert(f:close())
135local f <close> = assert(io.open(file,"\u{72}"))
135local f <close> = assert(io.open(file,"\u{72}"))
136l1,n1,n2,dummy=f:read("\u{6c}","\u{6e}","\u{6e}","\u{6c}")
136l1,n1,n2,dummy=f:read("\u{6c}","\u{6e}","\u{6e}","\u{6c}")
137−assert(((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and not n1))
137+assert(((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (not n1)))
138end
138end
139assert(os.remove(file))
139assert(os.remove(file))
140f=assert(io.open(file,"\u{77}"))
140f=assert(io.open(file,"\u{77}"))
@@ -158,10 +158,10 @@ f:write("\u{a}")
158f:write("\u{2e}\u{65}\u{2b}\u{9}\u{30}\u{2e}\u{65}\u{3b}\u{9}\u{2d}\u{2d}\u{3b}\u{20}\u{20}\u{30}\u{78}\u{58}\u{3b}\u{a}")
158f:write("\u{2e}\u{65}\u{2b}\u{9}\u{30}\u{2e}\u{65}\u{3b}\u{9}\u{2d}\u{2d}\u{3b}\u{20}\u{20}\u{30}\u{78}\u{58}\u{3b}\u{a}")
159assert(f:close())
159assert(f:close())
160f=assert(io.open(file,"\u{72}"))
160f=assert(io.open(file,"\u{72}"))
161−assert((f:read("\u{6e}") == - 12.3))
161+assert((f:read("\u{6e}") == (- 12.3)))
162;
162;
163assert((f:read(0x1) == "\u{2d}"))
163assert((f:read(0x1) == "\u{2d}"))
164−assert((f:read("\u{6e}") == - 0xffff))
164+assert((f:read("\u{6e}") == (- 0xffff)))
165;
165;
166assert((f:read(0x2) == "\u{2b}\u{20}"))
166assert((f:read(0x2) == "\u{2b}\u{20}"))
167assert((f:read("\u{6e}") == 0.3))
167assert((f:read("\u{6e}") == 0.3))
@@ -180,31 +180,31 @@ assert((f:read("\u{6e}") == 8.61328125))
180;
180;
181assert((f:read(0x1) == "\u{65}"))
181assert((f:read(0x1) == "\u{65}"))
182do
182do
183−assert(not f:read("\u{6e}"))
183+assert((not f:read("\u{6e}")))
184local s = f:read("\u{4c}")
184local s = f:read("\u{4c}")
185assert(string.find(s,"\u{5e}\u{30}\u{30}\u{2a}\u{a}\u{24}"))
185assert(string.find(s,"\u{5e}\u{30}\u{30}\u{2a}\u{a}\u{24}"))
186end
186end
187−assert(not f:read("\u{6e}"))
187+assert((not f:read("\u{6e}")))
188;
188;
189assert((f:read(0x2) == "\u{65}\u{2b}"))
189assert((f:read(0x2) == "\u{65}\u{2b}"))
190−assert(not f:read("\u{6e}"))
190+assert((not f:read("\u{6e}")))
191;
191;
192assert((f:read(0x1) == "\u{3b}"))
192assert((f:read(0x1) == "\u{3b}"))
193−assert(not f:read("\u{6e}"))
193+assert((not f:read("\u{6e}")))
194;
194;
195assert((f:read(0x2) == "\u{2d}\u{3b}"))
195assert((f:read(0x2) == "\u{2d}\u{3b}"))
196−assert(not f:read("\u{6e}"))
196+assert((not f:read("\u{6e}")))
197;
197;
198assert((f:read(0x1) == "\u{58}"))
198assert((f:read(0x1) == "\u{58}"))
199−assert(not f:read("\u{6e}"))
199+assert((not f:read("\u{6e}")))
200;
200;
201assert((f:read(0x1) == "\u{3b}"))
201assert((f:read(0x1) == "\u{3b}"))
202−assert(not f:read("\u{6e}"))
202+assert((not f:read("\u{6e}")))
203;
203;
204−assert(not f:read(0x0))
204+assert((not f:read(0x0)))
205assert(f:close())
205assert(f:close())
206assert(os.remove(file))
206assert(os.remove(file))
207−assert(not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
207+assert((not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
208assert(os.rename(otherfile,file))
208assert(os.rename(otherfile,file))
209io.output(otherfile)
209io.output(otherfile)
210local n = 0x0
210local n = 0x0
@@ -228,7 +228,7 @@ assert((n == 0x6))
228local f = assert(io.open(otherfile))
228local f = assert(io.open(otherfile))
229assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
229assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
230io.output(file)
230io.output(file)
231−assert(not io.output():read())
231+assert((not io.output():read()))
232n=0x0
232n=0x0
233for l in f:lines()
233for l in f:lines()
234do
234do
@@ -269,8 +269,8 @@ do
269t[i]=0x1
269t[i]=0x1
270end
270end
271t={io.lines(otherfile,table.unpack(t))()}
271t={io.lines(otherfile,table.unpack(t))()}
272−assert(# (((t == 0xfa) and (t[0x1] == "\u{61}")) and (t[# t] == "\u{61}")))
272+assert((# (((t == 0xfa) and (t[0x1] == "\u{61}")) and (t[(# t)] == "\u{61}"))))
273−t[# (t + 0x1)]=0x1
273+t[(# (t + 0x1))]=0x1
274checkerr("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",io.lines,otherfile,table.unpack(t))
274checkerr("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",io.lines,otherfile,table.unpack(t))
275collectgarbage()
275collectgarbage()
276assert(os.remove(otherfile))
276assert(os.remove(otherfile))
@@ -278,7 +278,7 @@ end
278io.input(file)
278io.input(file)
279do
279do
280local a,b,c = io.input():write("\u{78}\u{75}\u{78}\u{75}")
280local a,b,c = io.input():write("\u{78}\u{75}\u{78}\u{75}")
281−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
281+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
282end
282end
283checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",io.read,"\u{78}")
283checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",io.read,"\u{78}")
284assert((io.read(0x0) == ""))
284assert((io.read(0x0) == ""))
@@ -291,18 +291,18 @@ assert(io.input():seek("\u{73}\u{65}\u{74}",x))
291assert((io.read("\u{4c}") == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}"))
291assert((io.read("\u{4c}") == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}"))
292assert((io.read(0x1) == "\u{58}"))
292assert((io.read(0x1) == "\u{58}"))
293assert((io.read(string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")) == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
293assert((io.read(string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")) == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
294−assert(io.input():seek("\u{63}\u{75}\u{72}",- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")))
294+assert(io.input():seek("\u{63}\u{75}\u{72}",(- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))))
295assert((io.read() == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
295assert((io.read() == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
296assert((io.read() == ""))
296assert((io.read() == ""))
297assert((io.read("\u{6e}") == 0xd7a))
297assert((io.read("\u{6e}") == 0xd7a))
298assert((io.read(0x1) == "\u{a}"))
298assert((io.read(0x1) == "\u{a}"))
299−assert(not io.read(0x0))
299+assert((not io.read(0x0)))
300−assert(not io.read(0x1))
300+assert((not io.read(0x1)))
301−assert(not io.read(0x7530))
301+assert((not io.read(0x7530)))
302assert((({io.read(0x1)})[0x2] == undef))
302assert((({io.read(0x1)})[0x2] == undef))
303−assert(not io.read())
303+assert((not io.read()))
304assert((({io.read()})[0x2] == undef))
304assert((({io.read()})[0x2] == undef))
305−assert(not io.read("\u{6e}"))
305+assert((not io.read("\u{6e}")))
306assert((({io.read("\u{6e}")})[0x2] == undef))
306assert((({io.read("\u{6e}")})[0x2] == undef))
307assert((io.read("\u{61}") == ""))
307assert((io.read("\u{61}") == ""))
308assert((io.read("\u{61}") == ""))
308assert((io.read("\u{61}") == ""))
@@ -339,20 +339,20 @@ assert((io.read(string.len(t)) == t))
339assert((io.read(0x1) == "\u{20}"))
339assert((io.read(0x1) == "\u{20}"))
340assert(io.read(0x0))
340assert(io.read(0x0))
341assert((io.read("\u{61}") == "\u{3b}\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
341assert((io.read("\u{61}") == "\u{3b}\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
342−assert(not io.read(0x0))
342+assert((not io.read(0x0)))
343assert(io.close(io.input()))
343assert(io.close(io.input()))
344do
344do
345local function ismsg
345local function ismsg
346(m)
346(m)
347−return ((type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and not tonumber(m))
347+return ((type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (not tonumber(m)))
348end
348end
349local f = io.open(file,"\u{77}")
349local f = io.open(file,"\u{77}")
350local r,m,c = f:read()
350local r,m,c = f:read()
351−assert(not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
351+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
352assert(f:close())
352assert(f:close())
353f=io.open(file,"\u{72}")
353f=io.open(file,"\u{72}")
354r,m,c=f:write("\u{77}\u{68}\u{61}\u{74}\u{65}\u{76}\u{65}\u{72}")
354r,m,c=f:write("\u{77}\u{68}\u{61}\u{74}\u{65}\u{76}\u{65}\u{72}")
355−assert(not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
355+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
356assert(f:close())
356assert(f:close())
357f=io.open(file,"\u{77}")
357f=io.open(file,"\u{77}")
358r,m=pcall(f:lines())
358r,m=pcall(f:lines())
@@ -368,7 +368,7 @@ assert((io.read("\u{4c}") == "\u{a}"))
368assert((io.read("\u{4c}") == "\u{a}"))
368assert((io.read("\u{4c}") == "\u{a}"))
369assert((io.read("\u{4c}") == "\u{6c}\u{69}\u{6e}\u{65}\u{a}"))
369assert((io.read("\u{4c}") == "\u{6c}\u{69}\u{6e}\u{65}\u{a}"))
370assert((io.read("\u{4c}") == "\u{6f}\u{74}\u{68}\u{65}\u{72}"))
370assert((io.read("\u{4c}") == "\u{6f}\u{74}\u{68}\u{65}\u{72}"))
371−assert(not io.read("\u{4c}"))
371+assert((not io.read("\u{4c}")))
372io.input():close()
372io.input():close()
373local f = assert(io.open(file))
373local f = assert(io.open(file))
374local s = ""
374local s = ""
@@ -403,7 +403,7 @@ io.output(file)
403io.write("\u{61}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{33}\u{34}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{2a}\u{61}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{2d}\u{61}\u{a}"):close()
403io.write("\u{61}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{33}\u{34}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{2a}\u{61}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{2d}\u{61}\u{a}"):close()
404local t = {}
404local t = {}
405assert(load(io.lines(file,"\u{4c}"),nil,nil,t))()
405assert(load(io.lines(file,"\u{4c}"),nil,nil,t))()
406−assert((t.a == - ((0xa + 0x22) * 0x2)))
406+assert((t.a == (- ((0xa + 0x22) * 0x2))))
407do
407do
408local function gettoclose
408local function gettoclose
409(lv)
409(lv)
@@ -447,7 +447,7 @@ io.write("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}"):cl
447for a,b in io.lines(file,0x1,0x1)
447for a,b in io.lines(file,0x1,0x1)
448do
448do
449if (a == "\u{a}") then
449if (a == "\u{a}") then
450−assert(not b)
450+assert((not b))
451else
451else
452assert((tonumber(a) == (tonumber(b) - 0x1)))
452assert((tonumber(a) == (tonumber(b) - 0x1)))
453end
453end
@@ -461,7 +461,7 @@ do
461if (a == "") then
461if (a == "") then
462break
462break
463end
463end
464−assert(((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}") and not (b and not c)))
464+assert(((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}") and (not (b and (not c)))))
465end
465end
466collectgarbage()
466collectgarbage()
467io.output(file)
467io.output(file)
@@ -470,7 +470,7 @@ io.write("\u{30}\u{30}\u{a}\u{31}\u{30}\u{a}\u{32}\u{30}\u{a}\u{33}\u{30}\u{a}\u
470for a,b in io.lines(file,"\u{6e}","\u{6e}")
470for a,b in io.lines(file,"\u{6e}","\u{6e}")
471do
471do
472if (a == 0x28) then
472if (a == 0x28) then
473−assert(not b)
473+assert((not b))
474else
474else
475assert((a == (b - 0xa)))
475assert((a == (b - 0xa)))
476end
476end
@@ -479,13 +479,13 @@ io.output(file)
479;
479;
480io.write("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{a}\u{3d}\u{20}\u{58}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{20}\u{2a}\u{a}\u{32}\u{20}\u{2b}\u{a}\u{58}\u{3b}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{a}\u{2d}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{3b}\u{a}"):close()
480io.write("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{a}\u{3d}\u{20}\u{58}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{20}\u{2a}\u{a}\u{32}\u{20}\u{2b}\u{a}\u{58}\u{3b}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{a}\u{2d}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{3b}\u{a}"):close()
481_G.X=0x1
481_G.X=0x1
482−assert(not load((io.lines(file))))
482+assert((not load(io.lines(file))))
483collectgarbage()
483collectgarbage()
484−load((io.lines(file,"\u{4c}")))()
484+load(io.lines(file,"\u{4c}"))()
485assert((_G.X == 0x2))
485assert((_G.X == 0x2))
486−load((io.lines(file,0x1)))()
486+load(io.lines(file,0x1))()
487assert((_G.X == 0x4))
487assert((_G.X == 0x4))
488−load((io.lines(file,0x3)))()
488+load(io.lines(file,0x3))()
489assert((_G.X == 0x8))
489assert((_G.X == 0x8))
490_G.X=nil
490_G.X=nil
491print("\u{2b}")
491print("\u{2b}")
@@ -498,8 +498,8 @@ assert((x1 == _G.X2))
498_G.X2=nil
498_G.X2=nil
499print("\u{2b}")
499print("\u{2b}")
500assert(os.remove(file))
500assert(os.remove(file))
501−assert(not os.remove(file))
501+assert((not os.remove(file)))
502−assert(not os.remove(otherfile))
502+assert((not os.remove(otherfile)))
503local function testloadfile
503local function testloadfile
504(s,expres)
504(s,expres)
505io.output(file)
505io.output(file)
@@ -561,10 +561,10 @@ end
561do
561do
562io.open(file,"\u{77}"):write("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
562io.open(file,"\u{77}"):write("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
563local s,m = loadfile(file,"\u{62}")
563local s,m = loadfile(file,"\u{62}")
564−assert(not (s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}")))
564+assert((not (s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
565io.open(file,"\u{77}"):write("\u{1b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
565io.open(file,"\u{77}"):write("\u{1b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
566local s,m = loadfile(file,"\u{74}")
566local s,m = loadfile(file,"\u{74}")
567−assert(not (s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}")))
567+assert((not (s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
568assert(os.remove(file))
568assert(os.remove(file))
569end
569end
570io.output(file)
570io.output(file)
@@ -589,7 +589,7 @@ assert((io.read(0x3) == "\u{0}\u{0}\u{0}"))
589assert((io.read(0x0) == ""))
589assert((io.read(0x0) == ""))
590assert((io.read(0x1) == "\u{ff}"))
590assert((io.read(0x1) == "\u{ff}"))
591assert((io.read("\u{61}") == "\u{0}"))
591assert((io.read("\u{61}") == "\u{0}"))
592−assert(not io.read(0x0))
592+assert((not io.read(0x0)))
593assert((otherfilehandle == io.input()))
593assert((otherfilehandle == io.input()))
594otherfilehandle:close()
594otherfilehandle:close()
595assert(os.remove(file))
595assert(os.remove(file))
@@ -599,8 +599,8 @@ io.output(file):write("\u{20}\u{31}\u{32}\u{33}\u{2e}\u{34}\u{9}\u{2d}\u{35}\u{3
599io.input(file)
599io.input(file)
600local _,a,b,c,d,e,h,__ = io.read(0x1,"\u{6e}","\u{6e}","\u{6c}","\u{6c}","\u{6c}","\u{61}",0xa)
600local _,a,b,c,d,e,h,__ = io.read(0x1,"\u{6e}","\u{6e}","\u{6c}","\u{6c}","\u{6c}","\u{61}",0xa)
601assert(io.close(io.input()))
601assert(io.close(io.input()))
602−assert(((_ == "\u{20}") and not __))
602+assert(((_ == "\u{20}") and (not __)))
603−assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == 123.4)) and (b == - 0.56)))
603+assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == 123.4)) and (b == (- 0.56))))
604assert(((d == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (e == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")))
604assert(((d == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (e == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")))
605assert((h == "\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
605assert((h == "\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
606assert(os.remove(file))
606assert(os.remove(file))
@@ -632,7 +632,7 @@ f:close()
632fr:close()
632fr:close()
633assert(os.remove(file))
633assert(os.remove(file))
634end
634end
635−if not _soft then
635+if (not _soft) then
636print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{73}\u{20}\u{28}\u{3e}\u{20}\u{42}\u{55}\u{46}\u{53}\u{49}\u{5a}\u{29}")
636print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{73}\u{20}\u{28}\u{3e}\u{20}\u{42}\u{55}\u{46}\u{53}\u{49}\u{5a}\u{29}")
637io.output(file)
637io.output(file)
638for i = 0x1, 0x1389
638for i = 0x1, 0x1389
@@ -648,14 +648,14 @@ assert(((x == y) and (string.len(x) == ((0x1389 * 0xd) + 0x6))))
648io.input():seek("\u{73}\u{65}\u{74}",0x0)
648io.input():seek("\u{73}\u{65}\u{74}",0x0)
649y=io.read()
649y=io.read()
650assert((x == (y .. ("\u{a}" .. io.read()))))
650assert((x == (y .. ("\u{a}" .. io.read()))))
651−assert(not io.read())
651+assert((not io.read()))
652io.close(io.input())
652io.close(io.input())
653assert(os.remove(file))
653assert(os.remove(file))
654x=nil
654x=nil
655;
655;
656y=nil
656y=nil
657end
657end
658−if not _port then
658+if (not _port) then
659local progname
659local progname
660do
660do
661local arg = (arg or ARG)
661local arg = (arg or ARG)
@@ -689,7 +689,7 @@ assert((((x == x1) and (y == y1)) and (z == z1)))
689if (v[0x2] == "\u{6f}\u{6b}") then
689if (v[0x2] == "\u{6f}\u{6b}") then
690assert(((x and (y == "\u{65}\u{78}\u{69}\u{74}")) and (z == 0x0)))
690assert(((x and (y == "\u{65}\u{78}\u{69}\u{74}")) and (z == 0x0)))
691else
691else
692−assert(not (x and (y == v[0x2])))
692+assert((not (x and (y == v[0x2]))))
693assert((((v[0x3] == nil) and (z > 0x0)) or (v[0x3] == z)))
693assert((((v[0x3] == nil) and (z > 0x0)) or (v[0x3] == z)))
694end
694end
695end
695end
@@ -720,7 +720,7 @@ load(os.date("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{44}\u{2e}\u{79}\u{65}
720_G.D=nil
720_G.D=nil
721end
721end
722checkDateTable(os.time())
722checkDateTable(os.time())
723−if not _port then
723+if (not _port) then
724checkDateTable(0x0)
724checkDateTable(0x0)
725checkDateTable(0x1)
725checkDateTable(0x1)
726checkDateTable(0x3e8)
726checkDateTable(0x3e8)
@@ -737,23 +737,23 @@ checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{6
737checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x3e8,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 1.5})
737checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x3e8,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 1.5})
738checkerr("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}",os.time,{["\u{68}\u{6f}\u{75}\u{72}"] = 0xc})
738checkerr("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}",os.time,{["\u{68}\u{6f}\u{75}\u{72}"] = 0xc})
739if (string.packsize("\u{69}") == 0x4) then
739if (string.packsize("\u{69}") == 0x4) then
740−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
740+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- ((0x1 << 0x1f) + 0x76b)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
741−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - (0x1 << 0x1f),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
741+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- (0x1 << 0x1f)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
742if (math.maxinteger > (0x2 ^ 0x1f)) then
742if (math.maxinteger > (0x2 ^ 0x1f)) then
743checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
743checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
744end
744end
745end
745end
746−if not _port then
746+if (not _port) then
747assert((type(os.date("\u{25}\u{45}\u{78}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
747assert((type(os.date("\u{25}\u{45}\u{78}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
748assert((type(os.date("\u{25}\u{4f}\u{79}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
748assert((type(os.date("\u{25}\u{4f}\u{79}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
749local t0 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0})
749local t0 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0})
750local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0,["\u{73}\u{65}\u{63}"] = ((0x1 << 0x1f) - 0x1)})
750local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0,["\u{73}\u{65}\u{63}"] = ((0x1 << 0x1f) - 0x1)})
751assert(((t1 - t0) == ((0x1 << 0x1f) - 0x1)))
751assert(((t1 - t0) == ((0x1 << 0x1f) - 0x1)))
752t0=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
752t0=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
753−t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{73}\u{65}\u{63}"] = - (0x1 << 0x1f)})
753+t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{73}\u{65}\u{63}"] = (- (0x1 << 0x1f))})
754−assert(((t1 - t0) == - (0x1 << 0x1f)))
754+assert(((t1 - t0) == (- (0x1 << 0x1f))))
755if (maxint >= (0x2 ^ 0x3e)) then
755if (maxint >= (0x2 ^ 0x3e)) then
756−checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - maxint,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
756+checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- maxint),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
757if (string.packsize("\u{69}") == 0x4) then
757if (string.packsize("\u{69}") == 0x4) then
758if testerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x28)) then
758if testerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x28)) then
759print("\u{20}\u{20}\u{34}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
759print("\u{20}\u{20}\u{34}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
@@ -765,7 +765,7 @@ assert(tonumber(os.time({["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),
765checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3c})
765checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3c})
766end
766end
767checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{64}\u{61}\u{79}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = (0x2 ^ 0x20)})
767checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{64}\u{61}\u{79}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = (0x2 ^ 0x20)})
768−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = - ((0x1 << 0x1f) + 0x1),["\u{64}\u{61}\u{79}"] = 0x1})
768+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = (- ((0x1 << 0x1f) + 0x1)),["\u{64}\u{61}\u{79}"] = 0x1})
769checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
769checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
770else
770else
771print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
771print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
@@ -797,11 +797,11 @@ t1=os.time(os.date("\u{2a}\u{74}"))
797local diff = os.difftime(t1,t)
797local diff = os.difftime(t1,t)
798assert(((0x0 <= diff) and (diff <= 0x1)))
798assert(((0x0 <= diff) and (diff <= 0x1)))
799diff=os.difftime(t,t1)
799diff=os.difftime(t,t1)
800−assert(- ((0x1 <= diff) and (diff <= 0x0)))
800+assert((- ((0x1 <= diff) and (diff <= 0x0))))
801local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xc})
801local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xc})
802local t2 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xa,["\u{73}\u{65}\u{63}"] = 0x13})
802local t2 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xa,["\u{73}\u{65}\u{63}"] = 0x13})
803assert((os.difftime(t1,t2) == ((0x3c * 0x2) - 0x13)))
803assert((os.difftime(t1,t2) == ((0x3c * 0x2) - 0x13)))
804−t1={["\u{79}\u{65}\u{61}\u{72}"] = 0x7d5,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x1,["\u{6d}\u{69}\u{6e}"] = 0x0,["\u{73}\u{65}\u{63}"] = - 0xe12}
804+t1={["\u{79}\u{65}\u{61}\u{72}"] = 0x7d5,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x1,["\u{6d}\u{69}\u{6e}"] = 0x0,["\u{73}\u{65}\u{63}"] = (- 0xe12)}
805os.time(t1)
805os.time(t1)
806assert((((((((t1.day == 0x1f) and (t1.month == 0xc)) and (t1.year == 0x7d4)) and (t1.hour == 0x17)) and (t1.min == 0x3b)) and (t1.sec == 0x3a)) and (t1.yday == 0x16e)))
806assert((((((((t1.day == 0x1f) and (t1.month == 0xc)) and (t1.year == 0x7d4)) and (t1.hour == 0x17)) and (t1.min == 0x3b)) and (t1.sec == 0x3a)) and (t1.yday == 0x16e)))
807io.output(io.stdout)
807io.output(io.stdout)
desk/res/lua/cycled/foo.lua+1−1
@@ -69,7 +69,7 @@ return function (y)
69return (x + y)
69return (x + y)
70end
70end
71end
71end
72−x=- (0x1 + 0x8)
72+x=(- (0x1 + 0x8))
73if (_VERSION ~= version) then
73if (_VERSION ~= version) then
74io.stderr:write("\u{54}\u{68}\u{69}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{73}\u{75}\u{69}\u{74}\u{65}\u{20}\u{69}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}",version,"\u{2c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}",_VERSION,"\u{a}\u{45}\u{78}\u{69}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
74io.stderr:write("\u{54}\u{68}\u{69}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{73}\u{75}\u{69}\u{74}\u{65}\u{20}\u{69}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}",version,"\u{2c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}",_VERSION,"\u{a}\u{45}\u{78}\u{69}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
75return
75return
desk/res/lua/cycled/gc.lua+9−9
@@ -19,10 +19,10 @@ do
19local a = collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",0xc8)
19local a = collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",0xc8)
20local b = collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",0xc8)
20local b = collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",0xc8)
21local t = {0x0,0x2,0xa,0x5a,0x1f4,0x1388,0x7530,0x7ffffffe}
21local t = {0x0,0x2,0xa,0x5a,0x1f4,0x1388,0x7530,0x7ffffffe}
22−for i = 0x1, # t
22+for i = 0x1, (# t)
23do
23do
24local p = t[i]
24local p = t[i]
25−for j = 0x1, # t
25+for j = 0x1, (# t)
26do
26do
27local m = t[j]
27local m = t[j]
28collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",p)
28collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",p)
@@ -209,17 +209,17 @@ assert((gcinfo() < x))
209return i
209return i
210end
210end
211collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
211collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
212−if not _port then
212+if (not _port) then
213assert((dosteps(0xa) < dosteps(0x2)))
213assert((dosteps(0xa) < dosteps(0x2)))
214end
214end
215assert((dosteps(0x4e20) == 0x1))
215assert((dosteps(0x4e20) == 0x1))
216assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
216assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
217assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
217assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
218−assert(not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
218+assert((not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")))
219collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
219collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
220assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
220assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
221end
221end
222−if not _port then
222+if (not _port) then
223collectgarbage()
223collectgarbage()
224;
224;
225collectgarbage()
225collectgarbage()
@@ -453,7 +453,7 @@ setmetatable(s,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
453setmetatable(u,{["\u{5f}\u{5f}\u{67}\u{63}"] = function (o)
453setmetatable(u,{["\u{5f}\u{5f}\u{67}\u{63}"] = function (o)
454local i = s[o]
454local i = s[o]
455s[i]=true
455s[i]=true
456−assert(not s[(i - 0x1)])
456+assert((not s[(i - 0x1)]))
457if (i == 0x8) then
457if (i == 0x8) then
458error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{40}")
458error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{40}")
459end
459end
@@ -599,7 +599,7 @@ assert(string.find(_WARN,"\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}
599_WARN=false
599_WARN=false
600warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
600warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
601end
601end
602−if not _soft then
602+if (not _soft) then
603print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{73}\u{74}")
603print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{73}\u{74}")
604local a = {}
604local a = {}
605for i = 0x1, 0x30d40
605for i = 0x1, 0x30d40
@@ -772,7 +772,7 @@ warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
772_WARN=false
772_WARN=false
773error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}")
773error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}")
774end}
774end}
775−for i = 0xa, 0x1, - 0x1
775+for i = 0xa, 0x1, (- 0x1)
776do
776do
777table.insert(___Glob,setmetatable({i},mt))
777table.insert(___Glob,setmetatable({i},mt))
778end
778end
@@ -784,7 +784,7 @@ setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
784res=collectgarbage()
784res=collectgarbage()
785end})
785end})
786collectgarbage()
786collectgarbage()
787−assert(not res)
787+assert((not res))
788end
788end
789collectgarbage(oldmode)
789collectgarbage(oldmode)
790print("\u{4f}\u{4b}")
790print("\u{4f}\u{4b}")
desk/res/lua/cycled/gengc.lua+14−14
@@ -6,13 +6,13 @@ local oldmode = collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}
6do
6do
7local U = {}
7local U = {}
8collectgarbage()
8collectgarbage()
9−assert(not (T or (T.gcage(U) == "\u{6f}\u{6c}\u{64}")))
9+assert((not (T or (T.gcage(U) == "\u{6f}\u{6c}\u{64}"))))
10U[0x1]={["\u{78}"] = {0xea}}
10U[0x1]={["\u{78}"] = {0xea}}
11−assert(not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(U[0x1]) == "\u{6e}\u{65}\u{77}"))))
11+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(U[0x1]) == "\u{6e}\u{65}\u{77}")))))
12collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
12collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
13−assert(not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(U[0x1]) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}"))))
13+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(U[0x1]) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))))
14collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
14collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
15−assert(not (T or ((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(U[0x1]) == "\u{6f}\u{6c}\u{64}\u{31}"))))
15+assert((not (T or ((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(U[0x1]) == "\u{6f}\u{6c}\u{64}\u{31}")))))
16assert((U[0x1].x[0x1] == 0xea))
16assert((U[0x1].x[0x1] == 0xea))
17end
17end
18do
18do
@@ -22,11 +22,11 @@ local function foo
22end
22end
23local old = {0xa}
23local old = {0xa}
24collectgarbage()
24collectgarbage()
25−assert(not (T or (T.gcage(old) == "\u{6f}\u{6c}\u{64}")))
25+assert((not (T or (T.gcage(old) == "\u{6f}\u{6c}\u{64}"))))
26setmetatable(old,{})
26setmetatable(old,{})
27−assert(not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{30}")))
27+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{30}"))))
28collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
28collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
29−assert(not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{31}")))
29+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{31}"))))
30setmetatable(getmetatable(old),{["\u{5f}\u{5f}\u{67}\u{63}"] = foo})
30setmetatable(getmetatable(old),{["\u{5f}\u{5f}\u{67}\u{63}"] = foo})
31collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
31collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
32end
32end
@@ -36,7 +36,7 @@ A[0x1]=false
36local function gcf
36local function gcf
37(obj)
37(obj)
38A[0x1]=obj
38A[0x1]=obj
39−assert(not (T or (T.gcage(obj) == "\u{6f}\u{6c}\u{64}\u{31}")))
39+assert((not (T or (T.gcage(obj) == "\u{6f}\u{6c}\u{64}\u{31}"))))
40obj=nil
40obj=nil
41collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
41collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
42print(getmetatable(A[0x1]).x)
42print(getmetatable(A[0x1]).x)
@@ -44,9 +44,9 @@ end
44collectgarbage()
44collectgarbage()
45local obj = {}
45local obj = {}
46collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
46collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
47−assert(not (T or (T.gcage(obj) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))
47+assert((not (T or (T.gcage(obj) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}"))))
48setmetatable(obj,{["\u{5f}\u{5f}\u{67}\u{63}"] = gcf,["\u{78}"] = "\u{2b}"})
48setmetatable(obj,{["\u{5f}\u{5f}\u{67}\u{63}"] = gcf,["\u{78}"] = "\u{2b}"})
49−assert(not (T or (T.gcage(getmetatable(obj)) == "\u{6e}\u{65}\u{77}")))
49+assert((not (T or (T.gcage(getmetatable(obj)) == "\u{6e}\u{65}\u{77}"))))
50obj=nil
50obj=nil
51collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
51collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
52end
52end
@@ -74,13 +74,13 @@ end
74do
74do
75local t = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
75local t = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
76collectgarbage()
76collectgarbage()
77−assert(not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}")))
77+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
78t[0x1]={0xa}
78t[0x1]={0xa}
79−assert(not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gccolor(t) == "\u{67}\u{72}\u{61}\u{79}"))))
79+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gccolor(t) == "\u{67}\u{72}\u{61}\u{79}")))))
80collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
80collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
81−assert(not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gccolor(t) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}"))))
81+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gccolor(t) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")))))
82collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
82collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
83−assert(not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}")))
83+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
84t[0x1]={0xa}
84t[0x1]={0xa}
85collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
85collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
86assert((t[0x1] == nil))
86assert((t[0x1] == nil))
desk/res/lua/cycled/goto.lua+10−10
@@ -2,7 +2,7 @@ collectgarbage()
2local function errmsg
2local function errmsg
3(code,m)
3(code,m)
4local st,msg = load(code)
4local st,msg = load(code)
5−assert(not (st and string.find(msg,m)))
5+assert((not (st and string.find(msg,m))))
6end
6end
7errmsg("\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
7errmsg("\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
8errmsg("\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
8errmsg("\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
@@ -72,34 +72,34 @@ local function foo
72local a = {}
72local a = {}
73goto l3
73goto l3
74::l1::
74::l1::
75−a[# (a + 0x1)]=0x1
75+a[(# (a + 0x1))]=0x1
76;
76;
77goto l2
77goto l2
78;
78;
79::l2::
79::l2::
80−a[# (a + 0x1)]=0x2
80+a[(# (a + 0x1))]=0x2
81;
81;
82goto l5
82goto l5
83;
83;
84::l3::
84::l3::
85::l3a::
85::l3a::
86−a[# (a + 0x1)]=0x3
86+a[(# (a + 0x1))]=0x3
87;
87;
88goto l1
88goto l1
89;
89;
90::l4::
90::l4::
91−a[# (a + 0x1)]=0x4
91+a[(# (a + 0x1))]=0x4
92;
92;
93goto l6
93goto l6
94;
94;
95::l5::
95::l5::
96−a[# (a + 0x1)]=0x5
96+a[(# (a + 0x1))]=0x5
97;
97;
98goto l4
98goto l4
99;
99;
100::l6::
100::l6::
101assert((((((a[0x1] == 0x3) and (a[0x2] == 0x1)) and (a[0x3] == 0x2)) and (a[0x4] == 0x5)) and (a[0x5] == 0x4)))
101assert((((((a[0x1] == 0x3) and (a[0x2] == 0x1)) and (a[0x3] == 0x2)) and (a[0x4] == 0x5)) and (a[0x5] == 0x4)))
102−if not a[0x6] then
102+if (not a[0x6]) then
103a[0x6]=true
103a[0x6]=true
104;
104;
105goto l3a
105goto l3a
@@ -160,7 +160,7 @@ end
160local b
160local b
161do
161do
162local c
162local c
163−t[# (t + 0x1)]=function ()
163+t[(# (t + 0x1))]=function ()
164return a,b,c,d
164return a,b,c,d
165end
165end
166if (i > 0x2) then
166if (i > 0x2) then
@@ -168,7 +168,7 @@ goto l2
168end
168end
169do
169do
170local d
170local d
171−t[# (t + 0x1)]=function ()
171+t[(# (t + 0x1))]=function ()
172return a,b,c,d
172return a,b,c,d
173end
173end
174i=(i + 0x1)
174i=(i + 0x1)
@@ -181,7 +181,7 @@ end
181return t
181return t
182end
182end
183local a = foo()
183local a = foo()
184−assert(# (a == 0x6))
184+assert((# (a == 0x6)))
185for i = 0x2, 0x6
185for i = 0x2, 0x6
186do
186do
187assert((debug.upvalueid(a[0x1],0x1) == debug.upvalueid(a[i],0x1)))
187assert((debug.upvalueid(a[0x1],0x1) == debug.upvalueid(a[i],0x1)))
desk/res/lua/cycled/heavy.lua+12−12
@@ -6,11 +6,11 @@ local a = "\u{78}"
6local st,msg = pcall(function ()
6local st,msg = pcall(function ()
7while true do
7while true do
8a=(a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. a)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
8a=(a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. a)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
9−print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",# a))
9+print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",(# a)))
10end
10end
11end)
11end)
12−assert(not (st and (string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))))
12+assert((not (st and (string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
13−print(("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. # (a * 0x64)))
13+print(("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. (# (a * 0x64))))
14end
14end
15print("\u{2b}")
15print("\u{2b}")
16end
16end
@@ -44,19 +44,19 @@ lim=(lim + 0x3)
44s=string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
44s=string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
45s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
45s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
46local st,msg = load(s)
46local st,msg = load(s)
47−assert(not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")))
47+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}"))))
48print(msg)
48print(msg)
49end
49end
50function manylines()
50function manylines()
51print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")
51print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")
52local st,msg = loadrep("\u{a}","\u{6c}\u{69}\u{6e}\u{65}\u{73}")
52local st,msg = loadrep("\u{a}","\u{6c}\u{69}\u{6e}\u{65}\u{73}")
53−assert(not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")))
53+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}"))))
54print("\u{2b}")
54print("\u{2b}")
55end
55end
56function hugeid()
56function hugeid()
57print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{68}\u{75}\u{67}\u{65}\u{20}\u{69}\u{64}\u{65}\u{6e}\u{74}\u{69}\u{66}\u{69}\u{65}\u{72}")
57print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{68}\u{75}\u{67}\u{65}\u{20}\u{69}\u{64}\u{65}\u{6e}\u{74}\u{69}\u{66}\u{69}\u{65}\u{72}")
58local st,msg = loadrep("\u{61}","\u{63}\u{68}\u{61}\u{72}\u{73}")
58local st,msg = loadrep("\u{61}","\u{63}\u{68}\u{61}\u{72}\u{73}")
59−assert(not (st and (string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))))
59+assert((not (st and (string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
60print("\u{2b}")
60print("\u{2b}")
61end
61end
62function toomanyinst()
62function toomanyinst()
@@ -66,14 +66,14 @@ print("\u{2b}")
66end
66end
67local function loadrepfunc
67local function loadrepfunc
68(prefix,f)
68(prefix,f)
69−local count = - 0x1
69+local count = (- 0x1)
70local function aux
70local function aux
71()
71()
72count=(count + 0x1)
72count=(count + 0x1)
73if (count == 0x0) then
73if (count == 0x0) then
74return prefix
74return prefix
75else
75else
76−if ((count % (0x100000)) == 0x0) then
76+if ((count % 0x100000) == 0x0) then
77io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
77io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
78end
78end
79return f(count)
79return f(count)
@@ -95,13 +95,13 @@ local a = {}
95local st,msg = pcall(function ()
95local st,msg = pcall(function ()
96for i = 0x1, math.huge
96for i = 0x1, math.huge
97do
97do
98−if ((i % (0x100000)) == 0x0) then
98+if ((i % 0x100000) == 0x0) then
99io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
99io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
100end
100end
101a[i]=string.pack("\u{49}",i)
101a[i]=string.pack("\u{49}",i)
102end
102end
103end)
103end)
104−local size = # a
104+local size = (# a)
105a=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
105a=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
106print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}",(a * 0x400))
106print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}",(a * 0x400))
107print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}",msg)
107print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}",msg)
@@ -112,7 +112,7 @@ local a = {}
112local st,msg = pcall(function ()
112local st,msg = pcall(function ()
113for i = 0x1, math.huge
113for i = 0x1, math.huge
114do
114do
115−if ((i % (0x100000)) == 0x0) then
115+if ((i % 0x100000) == 0x0) then
116io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
116io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
117end
117end
118a[i]=i
118a[i]=i
@@ -120,7 +120,7 @@ end
120end)
120end)
121print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
121print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
122print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}\u{20}",msg)
122print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}\u{20}",msg)
123−print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",# a)
123+print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",(# a))
124end
124end
125toomanyidx()
125toomanyidx()
126print("\u{4f}\u{4b}")
126print("\u{4f}\u{4b}")
desk/res/lua/cycled/literals.lua+13−13
@@ -14,7 +14,7 @@ assert(("\u{63}\u{61}\u{62}" == "\u{63}\u{61}\u{62}"))
14assert(("\u{63}" == "\u{63}"))
14assert(("\u{63}" == "\u{63}"))
15assert(("\u{63}\u{a}" == "\u{63}\u{a}"))
15assert(("\u{63}\u{a}" == "\u{63}\u{a}"))
16assert(("\u{0}\u{0}\u{0}\u{61}\u{6c}\u{6f}" == ("\u{0}" .. ("\u{0}\u{0}" .. "\u{61}\u{6c}\u{6f}"))))
16assert(("\u{0}\u{0}\u{0}\u{61}\u{6c}\u{6f}" == ("\u{0}" .. ("\u{0}\u{0}" .. "\u{61}\u{6c}\u{6f}"))))
17−assert((0xa .. (0x14 .. - (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}"))))
17+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
18assert(("\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}" == "\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}"))
18assert(("\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}" == "\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}"))
19local function lexstring
19local function lexstring
20(x,y,n)
20(x,y,n)
@@ -44,7 +44,7 @@ local st,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. s),"")
44if (err ~= "\u{3c}\u{65}\u{6f}\u{66}\u{3e}") then
44if (err ~= "\u{3c}\u{65}\u{6f}\u{66}\u{3e}") then
45err=(err .. "\u{27}")
45err=(err .. "\u{27}")
46end
46end
47−assert(not (st and string.find(msg,("\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err))))
47+assert((not (st and string.find(msg,("\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err)))))
48end
48end
49lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}\u{22}","\u{5c}\u{78}\u{22}")
49lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}\u{22}","\u{5c}\u{78}\u{22}")
50lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}","\u{5c}\u{78}")
50lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}","\u{5c}\u{78}")
@@ -79,14 +79,14 @@ lexerror("\u{27}\u{61}\u{6c}\u{6f}\u{20}\u{5c}\u{39}\u{38}","\u{3c}\u{65}\u{6f}\
79for i = 0x0, 0xff
79for i = 0x0, 0xff
80do
80do
81local s = string.char(i)
81local s = string.char(i)
82−assert(not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == not load((s .. "\u{3d}\u{31}"),"")))
82+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == (not load((s .. "\u{3d}\u{31}"),"")))))
83−assert(not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == not load(("\u{61}" .. (s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}")),"")))
83+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == (not load(("\u{61}" .. (s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}")),"")))))
84end
84end
85local var1 = (string.rep("\u{61}",0x3a98) .. "\u{31}")
85local var1 = (string.rep("\u{61}",0x3a98) .. "\u{31}")
86local var2 = (string.rep("\u{61}",0x3a98) .. "\u{32}")
86local var2 = (string.rep("\u{61}",0x3a98) .. "\u{32}")
87local prog = string.format("\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{35}\u{a}\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{25}\u{73}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6e}\u{64}\u{a}",var1,var2,var1,var1,var2)
87local prog = string.format("\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{35}\u{a}\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{25}\u{73}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6e}\u{64}\u{a}",var1,var2,var1,var1,var2)
88local f = dostring(prog)
88local f = dostring(prog)
89−assert((((_G[var1] == 0x5) and (_G[var2] == 0x6)) and (f() == - 0x1)))
89+assert((((_G[var1] == 0x5) and (_G[var2] == 0x6)) and (f() == (- 0x1))))
90_G[var1],_G[var2]=nil
90_G[var1],_G[var2]=nil
91print("\u{2b}")
91print("\u{2b}")
92assert(("\u{a}\u{9}" == "\u{a}\u{9}"))
92assert(("\u{a}\u{9}" == "\u{a}\u{9}"))
@@ -165,15 +165,15 @@ assert((s == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5b}\u{3d}\u{3d}
165end
165end
166if (os.setlocale("\u{70}\u{74}\u{5f}\u{42}\u{52}") or os.setlocale("\u{70}\u{74}\u{62}")) then
166if (os.setlocale("\u{70}\u{74}\u{5f}\u{42}\u{52}") or os.setlocale("\u{70}\u{74}\u{62}")) then
167assert(((tonumber("\u{33}\u{2c}\u{34}") == 3.4) and (tonumber("\u{33}\u{2e}\u{34}") == 3.4)))
167assert(((tonumber("\u{33}\u{2c}\u{34}") == 3.4) and (tonumber("\u{33}\u{2e}\u{34}") == 3.4)))
168−assert((tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == - 0.4))
168+assert((tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == (- 0.4)))
169assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{2e}\u{34}\u{31}\u{20}\u{20}") == 0.25390625))
169assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{2e}\u{34}\u{31}\u{20}\u{20}") == 0.25390625))
170−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}"))
170+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}")))
171assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{2e}\u{34}"))() == 3.4))
171assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{2e}\u{34}"))() == 3.4))
172assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{34}\u{2c}\u{33}"))() == 0.4))
172assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{34}\u{2c}\u{33}"))() == 0.4))
173assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}"))() == 4.0))
173assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}"))() == 4.0))
174assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{2b}\u{2e}\u{35}"))() == 4.5))
174assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{2b}\u{2e}\u{35}"))() == 4.5))
175assert(((("\u{20}\u{30}\u{78}\u{2e}\u{31}\u{20}" + "\u{20}\u{30}\u{78}\u{2c}\u{31}") + "\u{2d}\u{30}\u{58}\u{2e}\u{31}\u{9}") == 0.0625))
175assert(((("\u{20}\u{30}\u{78}\u{2e}\u{31}\u{20}" + "\u{20}\u{30}\u{78}\u{2c}\u{31}") + "\u{2d}\u{30}\u{58}\u{2e}\u{31}\u{9}") == 0.0625))
176−assert(not (tonumber("\u{69}\u{6e}\u{66}") and not tonumber("\u{4e}\u{41}\u{4e}")))
176+assert((not (tonumber("\u{69}\u{6e}\u{66}") and (not tonumber("\u{4e}\u{41}\u{4e}")))))
177assert((assert(load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",4.51)))() == 4.51))
177assert((assert(load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",4.51)))() == 4.51))
178local a,b = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{35}\u{2e}")
178local a,b = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{35}\u{2e}")
179assert(string.find(b,"\u{27}\u{34}\u{25}\u{2e}\u{35}\u{25}\u{2e}\u{27}"))
179assert(string.find(b,"\u{27}\u{34}\u{25}\u{2e}\u{35}\u{25}\u{2e}\u{27}"))
@@ -184,14 +184,14 @@ end
184local s = "\u{61}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{d}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{d}"
184local s = "\u{61}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{d}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{d}"
185local c = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",s)
185local c = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",s)
186assert((assert(load(c))() == s))
186assert((assert(load(c))() == s))
187−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
187+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
188−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}"))
188+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}")))
189−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}"))
189+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}")))
190−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}"))
190+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}")))
191local function malformednum
191local function malformednum
192(n,exp)
192(n,exp)
193local s,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. n))
193local s,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. n))
194−assert(not (s and string.find(msg,exp)))
194+assert((not (s and string.find(msg,exp))))
195end
195end
196malformednum("\u{30}\u{78}\u{65}\u{2d}","\u{6e}\u{65}\u{61}\u{72}\u{20}\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
196malformednum("\u{30}\u{78}\u{65}\u{2d}","\u{6e}\u{65}\u{61}\u{72}\u{20}\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
197malformednum("\u{30}\u{78}\u{65}\u{70}\u{2d}\u{70}","\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
197malformednum("\u{30}\u{78}\u{65}\u{70}\u{2d}\u{70}","\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
desk/res/lua/cycled/locals.lua+51−51
@@ -98,11 +98,11 @@ do
98local i = 0x2
98local i = 0x2
99local p = 0x4
99local p = 0x4
100repeat
100repeat
101−for j = - 0x3, 0x3
101+for j = (- 0x3), 0x3
102do
102do
103assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{32}\u{5e}\u{25}\u{73}\u{29}",j,(p - j),i),""))()
103assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{32}\u{5e}\u{25}\u{73}\u{29}",j,(p - j),i),""))()
104−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,(p - j),i),""))()
104+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
105−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,(p - j),i),""))()
105+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
106end
106end
107p=(0x2 * p)
107p=(0x2 * p)
108;
108;
@@ -208,7 +208,7 @@ local function checkro
208(name,code)
208(name,code)
209local st,msg = load(code)
209local st,msg = load(code)
210local gab = string.format("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{25}\u{73}\u{27}",name)
210local gab = string.format("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{25}\u{73}\u{27}",name)
211−assert(not (st and string.find(msg,gab)))
211+assert((not (st and string.find(msg,gab))))
212end
212end
213checkro("\u{79}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{20}\u{79}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{7a}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{3b}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{31}\u{32}")
213checkro("\u{79}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{20}\u{79}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{7a}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{3b}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{31}\u{32}")
214checkro("\u{78}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{79}\u{2c}\u{20}\u{7a}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}")
214checkro("\u{78}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{79}\u{2c}\u{20}\u{7a}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}")
@@ -237,18 +237,18 @@ local a = {}
237do
237do
238local b <close> = false
238local b <close> = false
239local x <close> = setmetatable({"\u{78}"},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (self)
239local x <close> = setmetatable({"\u{78}"},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (self)
240−a[# (a + 0x1)]=self[0x1]
240+a[(# (a + 0x1))]=self[0x1]
241end})
241end})
242local w,y <close>,z = func2close(function (self,err)
242local w,y <close>,z = func2close(function (self,err)
243assert((err == nil))
243assert((err == nil))
244;
244;
245−a[# (a + 0x1)]="\u{79}"
245+a[(# (a + 0x1))]="\u{79}"
246end,0xa,0x14)
246end,0xa,0x14)
247local c <close> = nil
247local c <close> = nil
248−a[# (a + 0x1)]="\u{69}\u{6e}"
248+a[(# (a + 0x1))]="\u{69}\u{6e}"
249assert(((w == 0xa) and (z == 0x14)))
249assert(((w == 0xa) and (z == 0x14)))
250end
250end
251−a[# (a + 0x1)]="\u{6f}\u{75}\u{74}"
251+a[(# (a + 0x1))]="\u{6f}\u{75}\u{74}"
252assert(((((a[0x1] == "\u{69}\u{6e}") and (a[0x2] == "\u{79}")) and (a[0x3] == "\u{78}")) and (a[0x4] == "\u{6f}\u{75}\u{74}")))
252assert(((((a[0x1] == "\u{69}\u{6e}") and (a[0x2] == "\u{79}")) and (a[0x3] == "\u{78}")) and (a[0x4] == "\u{6f}\u{75}\u{74}")))
253end
253end
254do
254do
@@ -311,9 +311,9 @@ flag=true
311end})
311end})
312local function a
312local function a
313()
313()
314−return (function ()
314+return function ()
315return nil
315return nil
316−end),nil,nil,x
316+end,nil,nil,x
317end
317end
318local v <const> = 0x1
318local v <const> = 0x1
319local w <const> = 0x1
319local w <const> = 0x1
@@ -481,14 +481,14 @@ local x <close> = {}
481os.exit(false)
481os.exit(false)
482end
482end
483local stat,msg = pcall(foo)
483local stat,msg = pcall(foo)
484−assert(not (stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
484+assert((not (stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))))
485local function foo
485local function foo
486()
486()
487local xyz <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = print})
487local xyz <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = print})
488getmetatable(xyz).__close=nil
488getmetatable(xyz).__close=nil
489end
489end
490local stat,msg = pcall(foo)
490local stat,msg = pcall(foo)
491−assert(not (stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}")))
491+assert((not (stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}"))))
492local function foo
492local function foo
493()
493()
494local a1 <close> = func2close(function (_,msg)
494local a1 <close> = func2close(function (_,msg)
@@ -503,7 +503,7 @@ end)
503getmetatable(a2).__close=0x4
503getmetatable(a2).__close=0x4
504end
504end
505local stat,msg = pcall(foo)
505local stat,msg = pcall(foo)
506−assert(not (stat and (msg == 0xc)))
506+assert((not (stat and (msg == 0xc))))
507end
507end
508do
508do
509local track = {}
509local track = {}
@@ -512,11 +512,11 @@ local function foo
512local x <close> = func2close(function ()
512local x <close> = func2close(function ()
513local xx <close> = func2close(function (_,msg)
513local xx <close> = func2close(function (_,msg)
514assert((msg == nil))
514assert((msg == nil))
515−track[# (track + 0x1)]="\u{78}\u{78}"
515+track[(# (track + 0x1))]="\u{78}\u{78}"
516end)
516end)
517−track[# (track + 0x1)]="\u{78}"
517+track[(# (track + 0x1))]="\u{78}"
518end)
518end)
519−track[# (track + 0x1)]="\u{66}\u{6f}\u{6f}"
519+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
520return 0x14,0x1e,0x28
520return 0x14,0x1e,0x28
521end
521end
522local a,b,c,d = foo()
522local a,b,c,d = foo()
@@ -527,28 +527,28 @@ local function foo
527()
527()
528local x0 <close> = func2close(function (_,msg)
528local x0 <close> = func2close(function (_,msg)
529assert((msg == 0xca))
529assert((msg == 0xca))
530−track[# (track + 0x1)]="\u{78}\u{30}"
530+track[(# (track + 0x1))]="\u{78}\u{30}"
531end)
531end)
532local x <close> = func2close(function ()
532local x <close> = func2close(function ()
533local xx <close> = func2close(function (_,msg)
533local xx <close> = func2close(function (_,msg)
534assert((msg == 0x65))
534assert((msg == 0x65))
535−track[# (track + 0x1)]="\u{78}\u{78}"
535+track[(# (track + 0x1))]="\u{78}\u{78}"
536error(0xca)
536error(0xca)
537end)
537end)
538−track[# (track + 0x1)]="\u{78}"
538+track[(# (track + 0x1))]="\u{78}"
539error(0x65)
539error(0x65)
540end)
540end)
541−track[# (track + 0x1)]="\u{66}\u{6f}\u{6f}"
541+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
542return 0x14,0x1e,0x28
542return 0x14,0x1e,0x28
543end
543end
544local st,msg = pcall(foo)
544local st,msg = pcall(foo)
545−assert(not (st and (msg == 0xca)))
545+assert((not (st and (msg == 0xca))))
546assert(((((track[0x1] == "\u{66}\u{6f}\u{6f}") and (track[0x2] == "\u{78}")) and (track[0x3] == "\u{78}\u{78}")) and (track[0x4] == "\u{78}\u{30}")))
546assert(((((track[0x1] == "\u{66}\u{6f}\u{6f}") and (track[0x2] == "\u{78}")) and (track[0x3] == "\u{78}\u{78}")) and (track[0x4] == "\u{78}\u{30}")))
547end
547end
548local function checktable
548local function checktable
549(t1,t2)
549(t1,t2)
550−assert(# (t1 == # t2))
550+assert((# (t1 == (# t2))))
551−for i = 0x1, # t1
551+for i = 0x1, (# t1)
552do
552do
553assert((t1[i] == t2[i]))
553assert((t1[i] == t2[i]))
554end
554end
@@ -579,7 +579,7 @@ st,obj=xpcall(overflow,errorh,0x0)
579tracegc.start()
579tracegc.start()
580end)
580end)
581co()
581co()
582−assert(not ((st and (obj[0x1] == 0xa)) and (flag[0x1] == 0x64)))
582+assert((not ((st and (obj[0x1] == 0xa)) and (flag[0x1] == 0x64))))
583end
583end
584if rawget(_G,"\u{54}") then
584if rawget(_G,"\u{54}") then
585do
585do
@@ -670,16 +670,16 @@ collectgarbage()
670local m = T.totalmem()
670local m = T.totalmem()
671collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
671collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
672T.totalmem((m + extra))
672T.totalmem((m + extra))
673−assert(not pcall(table.concat,a))
673+assert((not pcall(table.concat,a)))
674assert(((T.totalmem() - m) <= extra))
674assert(((T.totalmem() - m) <= extra))
675T.totalmem(((m + lim) + extra))
675T.totalmem(((m + lim) + extra))
676−assert(not pcall(table.concat,a))
676+assert((not pcall(table.concat,a)))
677assert(((T.totalmem() - m) <= extra))
677assert(((T.totalmem() - m) <= extra))
678T.totalmem(((m + (0x2 * lim)) + extra))
678T.totalmem(((m + (0x2 * lim)) + extra))
679−assert(not pcall(table.concat,a))
679+assert((not pcall(table.concat,a)))
680assert(((T.totalmem() - m) <= extra))
680assert(((T.totalmem() - m) <= extra))
681T.totalmem(((m + (0x4 * lim)) + extra))
681T.totalmem(((m + (0x4 * lim)) + extra))
682−assert(# (table.concat(a) == (0x2 * lim)))
682+assert((# (table.concat(a) == (0x2 * lim))))
683T.totalmem(0x0)
683T.totalmem(0x0)
684collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
684collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
685print("\u{2b}")
685print("\u{2b}")
@@ -688,13 +688,13 @@ do
688local trace = {}
688local trace = {}
689local function hook
689local function hook
690(event)
690(event)
691−trace[# (trace + 0x1)]=(event .. ("\u{20}" .. (debug.getinfo(0x2).name or "\u{3f}")))
691+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. (debug.getinfo(0x2).name or "\u{3f}")))
692end
692end
693local x = func2close(function (_,msg)
693local x = func2close(function (_,msg)
694−trace[# (trace + 0x1)]="\u{78}"
694+trace[(# (trace + 0x1))]="\u{78}"
695end)
695end)
696local y = func2close(function (_,msg)
696local y = func2close(function (_,msg)
697−trace[# (trace + 0x1)]="\u{79}"
697+trace[(# (trace + 0x1))]="\u{79}"
698end)
698end)
699debug.sethook(hook,"\u{72}")
699debug.sethook(hook,"\u{72}")
700local t = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{33}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}",x,y)}
700local t = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{33}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}",x,y)}
@@ -707,12 +707,12 @@ do
707local trace = {}
707local trace = {}
708local function hook
708local function hook
709(event)
709(event)
710−trace[# (trace + 0x1)]=(event .. ("\u{20}" .. debug.getinfo(0x2).name))
710+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. debug.getinfo(0x2).name))
711end
711end
712local function foo
712local function foo
713(...)
713(...)
714local x <close> = func2close(function (_,msg)
714local x <close> = func2close(function (_,msg)
715−trace[# (trace + 0x1)]="\u{78}"
715+trace[(# (trace + 0x1))]="\u{78}"
716end)
716end)
717local y <close> = func2close(function (_,msg)
717local y <close> = func2close(function (_,msg)
718debug.sethook(hook,"\u{72}")
718debug.sethook(hook,"\u{72}")
@@ -728,28 +728,28 @@ print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\
728do
728do
729local trace = {}
729local trace = {}
730local co = coroutine.wrap(function ()
730local co = coroutine.wrap(function ()
731−trace[# (trace + 0x1)]="\u{6e}\u{6f}\u{77}\u{58}"
731+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{58}"
732local x <close> = func2close(function (_,msg)
732local x <close> = func2close(function (_,msg)
733assert((msg == nil))
733assert((msg == nil))
734−trace[# (trace + 0x1)]="\u{78}\u{31}"
734+trace[(# (trace + 0x1))]="\u{78}\u{31}"
735coroutine.yield("\u{78}")
735coroutine.yield("\u{78}")
736−trace[# (trace + 0x1)]="\u{78}\u{32}"
736+trace[(# (trace + 0x1))]="\u{78}\u{32}"
737end)
737end)
738return pcall(function ()
738return pcall(function ()
739do
739do
740local z <close> = func2close(function (_,msg)
740local z <close> = func2close(function (_,msg)
741assert((msg == nil))
741assert((msg == nil))
742−trace[# (trace + 0x1)]="\u{7a}\u{31}"
742+trace[(# (trace + 0x1))]="\u{7a}\u{31}"
743coroutine.yield("\u{7a}")
743coroutine.yield("\u{7a}")
744−trace[# (trace + 0x1)]="\u{7a}\u{32}"
744+trace[(# (trace + 0x1))]="\u{7a}\u{32}"
745end)
745end)
746end
746end
747−trace[# (trace + 0x1)]="\u{6e}\u{6f}\u{77}\u{59}"
747+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{59}"
748local y <close> = func2close(function (_,msg)
748local y <close> = func2close(function (_,msg)
749assert((msg == nil))
749assert((msg == nil))
750−trace[# (trace + 0x1)]="\u{79}\u{31}"
750+trace[(# (trace + 0x1))]="\u{79}\u{31}"
751coroutine.yield("\u{79}")
751coroutine.yield("\u{79}")
752−trace[# (trace + 0x1)]="\u{79}\u{32}"
752+trace[(# (trace + 0x1))]="\u{79}\u{32}"
753end)
753end)
754return 0xa,0x14,0x1e
754return 0xa,0x14,0x1e
755end)
755end)
@@ -773,7 +773,7 @@ local res = table.pack(co())
773assert(((res.n == 0x2) and (res[0x2] == nil)))
773assert(((res.n == 0x2) and (res[0x2] == nil)))
774local res2 = table.pack(co())
774local res2 = table.pack(co())
775assert((res2.n == t.n))
775assert((res2.n == t.n))
776−for i = 0x1, # t
776+for i = 0x1, (# t)
777do
777do
778if (t[i] == "\u{78}") then
778if (t[i] == "\u{78}") then
779assert((res2[i] == res[0x1]))
779assert((res2[i] == res[0x1]))
@@ -861,7 +861,7 @@ assert(((a == "\u{79}") and (b == nil)))
861a,b=co()
861a,b=co()
862assert(((a == "\u{7a}") and (b == nil)))
862assert(((a == "\u{7a}") and (b == nil)))
863local st,msg = co()
863local st,msg = co()
864−assert(not (st and (msg == 0x15)))
864+assert((not (st and (msg == 0x15))))
865local a,b = co()
865local a,b = co()
866assert(((a == "\u{78}") and (b == nil)))
866assert(((a == "\u{78}") and (b == nil)))
867a,b=co()
867a,b=co()
@@ -869,7 +869,7 @@ assert(((a == "\u{79}") and (b == nil)))
869a,b=co()
869a,b=co()
870assert(((a == "\u{7a}") and (b == nil)))
870assert(((a == "\u{7a}") and (b == nil)))
871local st,msg = co()
871local st,msg = co()
872−assert(not (st and (msg == (0xa + 0x14))))
872+assert((not (st and (msg == (0xa + 0x14)))))
873end
873end
874do
874do
875local x = false
875local x = false
@@ -888,11 +888,11 @@ coroutine.yield(0xc8)
888error(0x17)
888error(0x17)
889end)
889end)
890local b = co()
890local b = co()
891−assert(((b == 0x64) and not (x and not y)))
891+assert(((b == 0x64) and (not (x and (not y)))))
892b=co()
892b=co()
893−assert(((b == 0xc8) and not (x and y)))
893+assert(((b == 0xc8) and (not (x and y))))
894local a,b = pcall(co)
894local a,b = pcall(co)
895−assert(not (((a and (b == 0x17)) and x) and y))
895+assert((not (((a and (b == 0x17)) and x) and y)))
896end
896end
897do
897do
898local x = 0x0
898local x = 0x0
@@ -917,7 +917,7 @@ assert((x == 0x0))
917local st,msg = pcall(co)
917local st,msg = pcall(co)
918;
918;
919assert((x == 0x2))
919assert((x == 0x2))
920−assert(not (st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}")))
920+assert((not (st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}"))))
921local x = 0x0
921local x = 0x0
922local y = 0x0
922local y = 0x0
923co=coroutine.wrap(function ()
923co=coroutine.wrap(function ()
@@ -940,7 +940,7 @@ assert((co() == 0x64))
940assert((x == 0x0))
940assert((x == 0x0))
941local st,msg = pcall(co)
941local st,msg = pcall(co)
942assert(((x == 0x1) and (y == 0x1)))
942assert(((x == 0x1) and (y == 0x1)))
943−assert(not (st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}")))
943+assert((not (st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}"))))
944end
944end
945local co
945local co
946co=coroutine.wrap(function ()
946co=coroutine.wrap(function ()
@@ -996,10 +996,10 @@ local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{
996local obj = func2close(coroutine.yield)
996local obj = func2close(coroutine.yield)
997local co = coroutine.create(f)
997local co = coroutine.create(f)
998local st,msg = coroutine.resume(co,obj)
998local st,msg = coroutine.resume(co,obj)
999−assert(not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}")))
999+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}"))))
1000local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}")
1000local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}")
1001local st,msg = pcall(f,obj)
1001local st,msg = pcall(f,obj)
1002−assert(not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}")))
1002+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}"))))
1003end
1003end
1004end
1004end
1005do
1005do
desk/res/lua/cycled/main.lua+6−6
@@ -33,7 +33,7 @@ return t
33end
33end
34local function checkprogout
34local function checkprogout
35(s)
35(s)
36−assert((string.sub(s,- 0x1) == "\u{a}"))
36+assert((string.sub(s,(- 0x1)) == "\u{a}"))
37local t = getoutput()
37local t = getoutput()
38for line in string.gmatch(s,"\u{2e}\u{2d}\u{a}")
38for line in string.gmatch(s,"\u{2e}\u{2d}\u{a}")
39do
39do
@@ -60,7 +60,7 @@ local function NoRun
60p=string.gsub(p,"\u{6c}\u{75}\u{61}",("\u{22}" .. (progname .. "\u{22}")),0x1)
60p=string.gsub(p,"\u{6c}\u{75}\u{61}",("\u{22}" .. (progname .. "\u{22}")),0x1)
61local s = string.format(p,...)
61local s = string.format(p,...)
62s=string.format("\u{25}\u{73}\u{20}\u{3e}\u{25}\u{73}\u{20}\u{32}\u{3e}\u{26}\u{31}",s,out)
62s=string.format("\u{25}\u{73}\u{20}\u{3e}\u{25}\u{73}\u{20}\u{32}\u{3e}\u{26}\u{31}",s,out)
63−assert(not os.execute(s))
63+assert((not os.execute(s)))
64assert(string.find(getoutput(),msg,0x1,true))
64assert(string.find(getoutput(),msg,0x1,true))
65end
65end
66RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{76}")
66RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{76}")
@@ -124,13 +124,13 @@ local out = getoutput()
124assert((defaultpath == string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}")))
124assert((defaultpath == string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}")))
125assert((defaultCpath == string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}")))
125assert((defaultCpath == string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}")))
126end
126end
127−assert(not ((string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}")) and not (string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))))
127+assert((not ((string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}")) and (not (string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))))))
128local function convert
128local function convert
129(p)
129(p)
130prepfile("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}\u{29}")
130prepfile("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}\u{29}")
131RUN("\u{65}\u{6e}\u{76}\u{20}\u{4c}\u{55}\u{41}\u{5f}\u{50}\u{41}\u{54}\u{48}\u{3d}\u{22}\u{25}\u{73}\u{22}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",p,prog,out)
131RUN("\u{65}\u{6e}\u{76}\u{20}\u{4c}\u{55}\u{41}\u{5f}\u{50}\u{41}\u{54}\u{48}\u{3d}\u{22}\u{25}\u{73}\u{22}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",p,prog,out)
132local expected = getoutput()
132local expected = getoutput()
133−expected=string.sub(expected,0x1,- 0x2)
133+expected=string.sub(expected,0x1,(- 0x2))
134if string.find(p,"\u{3b}\u{3b}") then
134if string.find(p,"\u{3b}\u{3b}") then
135p=string.gsub(p,"\u{3b}\u{3b}",("\u{3b}" .. (defaultpath .. "\u{3b}")))
135p=string.gsub(p,"\u{3b}\u{3b}",("\u{3b}" .. (defaultpath .. "\u{3b}")))
136p=string.gsub(p,"\u{5e}\u{3b}","")
136p=string.gsub(p,"\u{5e}\u{3b}","")
@@ -240,7 +240,7 @@ RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,ou
240checkprogout("\u{31}\u{32}\u{30}\u{a}\u{4f}\u{6b}\u{a}")
240checkprogout("\u{31}\u{32}\u{30}\u{a}\u{4f}\u{6b}\u{a}")
241assert(os.remove(prog))
241assert(os.remove(prog))
242assert(os.remove(otherprog))
242assert(os.remove(otherprog))
243−assert(not os.remove(out))
243+assert((not os.remove(out)))
244NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{68}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{68}")
244NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{68}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{68}")
245NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{2d}\u{2d}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{2d}\u{2d}")
245NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{2d}\u{2d}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{2d}\u{2d}")
246NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{45}\u{78}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{45}\u{78}")
246NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{45}\u{78}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{45}\u{78}")
@@ -300,7 +300,7 @@ assert(os.execute("\u{73}\u{6c}\u{65}\u{65}\u{70}\u{20}\u{31}"))
300local n = 0x64
300local n = 0x64
301for i = 0x0, 0x64
301for i = 0x0, 0x64
302do
302do
303−if not kill(pid) then
303+if (not kill(pid)) then
304n=i
304n=i
305break
305break
306end
306end
desk/res/lua/cycled/math.lua+231−231
@@ -18,22 +18,22 @@ local function isNaN
18return (x ~= x)
18return (x ~= x)
19end
19end
20assert(isNaN((0x0 / 0x0)))
20assert(isNaN((0x0 / 0x0)))
21−assert(not isNaN((0x1 / 0x0)))
21+assert((not isNaN((0x1 / 0x0))))
22do
22do
23local x = (2.0 ^ floatbits)
23local x = (2.0 ^ floatbits)
24assert(((x > (x - 1.0)) and (x == (x + 1.0))))
24assert(((x > (x - 1.0)) and (x == (x + 1.0))))
25print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{28}\u{6d}\u{61}\u{6e}\u{74}\u{69}\u{73}\u{73}\u{61}\u{29}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",intbits,floatbits))
25print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{28}\u{6d}\u{61}\u{6e}\u{74}\u{69}\u{73}\u{73}\u{61}\u{29}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",intbits,floatbits))
26end
26end
27−assert((((math.type(0x0) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(0.0) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and not math.type("\u{31}\u{30}")))
27+assert((((math.type(0x0) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(0.0) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and (not math.type("\u{31}\u{30}"))))
28local function checkerror
28local function checkerror
29(msg,f, ...)
29(msg,f, ...)
30local s,err = pcall(f,...)
30local s,err = pcall(f,...)
31−assert(not (s and string.find(err,msg)))
31+assert((not (s and string.find(err,msg))))
32end
32end
33local msgf2i = "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{2e}\u{2a}\u{20}\u{68}\u{61}\u{73}\u{20}\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{61}\u{74}\u{69}\u{6f}\u{6e}"
33local msgf2i = "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{2e}\u{2a}\u{20}\u{68}\u{61}\u{73}\u{20}\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{61}\u{74}\u{69}\u{6f}\u{6e}"
34local function eq
34local function eq
35(a,b,limit)
35(a,b,limit)
36−if not limit then
36+if (not limit) then
37if (floatbits >= 0x32) then
37if (floatbits >= 0x32) then
38limit=1e-11
38limit=1e-11
39else
39else
@@ -49,30 +49,30 @@ end
49assert((((((0.0 == 0x0) and (0.0 == 0x0)) and (0.0 == 0x0)) and (20.0 == 0x14)) and (0.2 == 0.2)))
49assert((((((0.0 == 0x0) and (0.0 == 0x0)) and (0.0 == 0x0)) and (20.0 == 0x14)) and (0.2 == 0.2)))
50do
50do
51local a,b,c = "\u{32}","\u{20}\u{33}\u{65}\u{30}\u{20}","\u{20}\u{31}\u{30}\u{20}\u{20}"
51local a,b,c = "\u{32}","\u{20}\u{33}\u{65}\u{30}\u{20}","\u{20}\u{31}\u{30}\u{20}\u{20}"
52−assert((((a + b) == 0x5) and - (b == - ((0x3 and ((b + "\u{32}") == 0x5)) and (("\u{31}\u{30}" - c) == 0x0)))))
52+assert((((a + b) == 0x5) and (- (b == (- ((0x3 and ((b + "\u{32}") == 0x5)) and (("\u{31}\u{30}" - c) == 0x0)))))))
53assert((((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
53assert((((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
54−assert(((((a == "\u{32}") and (b == "\u{20}\u{33}\u{65}\u{30}\u{20}")) and (c == "\u{20}\u{31}\u{30}\u{20}\u{20}")) and - (c == - "\u{20}\u{20}\u{31}\u{30}\u{20}")))
54+assert(((((a == "\u{32}") and (b == "\u{20}\u{33}\u{65}\u{30}\u{20}")) and (c == "\u{20}\u{31}\u{30}\u{20}\u{20}")) and (- (c == (- "\u{20}\u{20}\u{31}\u{30}\u{20}")))))
55assert((((c % a) == 0x0) and ((a ^ b) == 0x8)))
55assert((((c % a) == 0x0) and ((a ^ b) == 0x8)))
56a=0x0
56a=0x0
57−assert((a == - (a and (0x0 == - 0x0))))
57+assert((a == (- (a and (0x0 == (- 0x0))))))
58end
58end
59do
59do
60−local x = - 0x1
60+local x = (- 0x1)
61local mz = (0x0 / x)
61local mz = (0x0 / x)
62local t = {[0x0] = 0xa,0x14,0x1e,0x28,0x32}
62local t = {[0x0] = 0xa,0x14,0x1e,0x28,0x32}
63−assert(((t[mz] == t[0x0]) and (t[- 0x0] == t[0x0])))
63+assert(((t[mz] == t[0x0]) and (t[(- 0x0)] == t[0x0])))
64end
64end
65do
65do
66local a,b = math.modf(3.5)
66local a,b = math.modf(3.5)
67assert(((a == 3.0) and (b == 0.5)))
67assert(((a == 3.0) and (b == 0.5)))
68−a,b=math.modf(- 2.5)
68+a,b=math.modf((- 2.5))
69−assert((a == - (2.0 and (b == - 0.5))))
69+assert((a == (- (2.0 and (b == (- 0.5))))))
70−a,b=math.modf(- 3e23)
70+a,b=math.modf((- 3e23))
71−assert((a == - (3e23 and (b == 0.0))))
71+assert((a == (- (3e23 and (b == 0.0)))))
72a,b=math.modf(3e35)
72a,b=math.modf(3e35)
73assert(((a == 3e35) and (b == 0.0)))
73assert(((a == 3e35) and (b == 0.0)))
74−a,b=math.modf(- (0x1 / 0x0))
74+a,b=math.modf((- (0x1 / 0x0)))
75−assert((a == - ((0x1 / 0x0) and (b == 0.0))))
75+assert((a == (- ((0x1 / 0x0) and (b == 0.0)))))
76a,b=math.modf((0x1 / 0x0))
76a,b=math.modf((0x1 / 0x0))
77assert(((a == (0x1 / 0x0)) and (b == 0.0)))
77assert(((a == (0x1 / 0x0)) and (b == 0.0)))
78a,b=math.modf((0x0 / 0x0))
78a,b=math.modf((0x0 / 0x0))
@@ -83,15 +83,15 @@ a,b=math.modf(minint)
83assert((eqT(a,minint) and eqT(b,0.0)))
83assert((eqT(a,minint) and eqT(b,0.0)))
84end
84end
85assert((math.huge > 1e31))
85assert((math.huge > 1e31))
86−assert(- (math.huge < - 1e31))
86+assert((- (math.huge < (- 1e31))))
87assert((minint < (minint + 0x1)))
87assert((minint < (minint + 0x1)))
88assert(((maxint - 0x1) < maxint))
88assert(((maxint - 0x1) < maxint))
89assert(((0x0 - minint) == minint))
89assert(((0x0 - minint) == minint))
90assert(((minint * minint) == 0x0))
90assert(((minint * minint) == 0x0))
91assert((((maxint * maxint) * maxint) == maxint))
91assert((((maxint * maxint) * maxint) == maxint))
92−for _,i in pairs({- 0x10,- 0xf,- 0x3,- 0x2,- 0x1,0x0,0x1,0x2,0x3,0xf})
92+for _,i in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x0,0x1,0x2,0x3,0xf})
93do
93do
94−for _,j in pairs({- 0x10,- 0xf,- 0x3,- 0x2,- 0x1,0x1,0x2,0x3,0xf})
94+for _,j in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x1,0x2,0x3,0xf})
95do
95do
96for _,ti in pairs({0x0,0.0})
96for _,ti in pairs({0x0,0.0})
97do
97do
@@ -105,9 +105,9 @@ end
105end
105end
106end
106end
107assert(((0x1 // 0.0) == (0x1 / 0x0)))
107assert(((0x1 // 0.0) == (0x1 / 0x0)))
108−assert(- ((0x1 // 0.0) == - (0x1 / 0x0)))
108+assert((- ((0x1 // 0.0) == (- (0x1 / 0x0)))))
109assert(eqT((3.5 // 1.5),2.0))
109assert(eqT((3.5 // 1.5),2.0))
110−assert(eqT((3.5 // - 1.5),- 3.0))
110+assert(eqT((3.5 // (- 1.5)),(- 3.0)))
111do
111do
112local x,y
112local x,y
113x=0x1
113x=0x1
@@ -119,7 +119,7 @@ assert(((x // 0x0) == (0x1 / 0x0)))
119x=3.5
119x=3.5
120;
120;
121assert(eqT((x // 0x1),3.0))
121assert(eqT((x // 0x1),3.0))
122−assert(eqT((x // - 0x1),- 4.0))
122+assert(eqT((x // (- 0x1)),(- 4.0)))
123x=3.5
123x=3.5
124;
124;
125y=1.5
125y=1.5
@@ -127,9 +127,9 @@ y=1.5
127assert(eqT((x // y),2.0))
127assert(eqT((x // y),2.0))
128x=3.5
128x=3.5
129;
129;
130−y=- 1.5
130+y=(- 1.5)
131;
131;
132−assert(eqT((x // y),- 3.0))
132+assert(eqT((x // y),(- 3.0)))
133end
133end
134assert(((maxint // maxint) == 0x1))
134assert(((maxint // maxint) == 0x1))
135assert(((maxint // 0x1) == maxint))
135assert(((maxint // 0x1) == maxint))
@@ -140,17 +140,17 @@ assert(((minint // minint) == 0x1))
140assert((((minint + 0x1) // minint) == 0x0))
140assert((((minint + 0x1) // minint) == 0x0))
141assert(((minint // (minint + 0x1)) == 0x1))
141assert(((minint // (minint + 0x1)) == 0x1))
142assert(((minint // 0x1) == minint))
142assert(((minint // 0x1) == minint))
143−assert((minint // - (0x1 == - minint)))
143+assert((minint // (- (0x1 == (- minint)))))
144−assert((minint // - (0x2 == (0x2 ^ (intbits - 0x2)))))
144+assert((minint // (- (0x2 == (0x2 ^ (intbits - 0x2))))))
145−assert((maxint // - (0x1 == - maxint)))
145+assert((maxint // (- (0x1 == (- maxint)))))
146do
146do
147−assert((0x2 ^ - (0x3 == (0x1 / (0x2 ^ 0x3)))))
147+assert((0x2 ^ (- (0x3 == (0x1 / (0x2 ^ 0x3))))))
148−assert(eq(((- 0x3) ^ - 0x3),(0x1 / ((- 0x3) ^ 0x3))))
148+assert(eq(((- 0x3) ^ (- 0x3)),(0x1 / ((- 0x3) ^ 0x3))))
149−for i = - 0x3, 0x3
149+for i = (- 0x3), 0x3
150do
150do
151−for j = - 0x3, 0x3
151+for j = (- 0x3), 0x3
152do
152do
153−if not ((_port or (i ~= 0x0)) or (j > 0x0)) then
153+if (not ((_port or (i ~= 0x0)) or (j > 0x0))) then
154assert(eq((i ^ j),(0x1 / (i ^ (- j)))))
154assert(eq((i ^ j),(0x1 / (i ^ (- j)))))
155end
155end
156end
156end
@@ -169,38 +169,38 @@ assert((maxint ~= (maxint - 1.0)))
169end
169end
170assert(((maxint + 0.0) == ((2.0 ^ (intbits - 0x1)) - 1.0)))
170assert(((maxint + 0.0) == ((2.0 ^ (intbits - 0x1)) - 1.0)))
171assert(((minint + 0.0) == minint))
171assert(((minint + 0.0) == minint))
172−assert(((minint + 0.0) == - (2.0 ^ (intbits - 0x1))))
172+assert(((minint + 0.0) == (- (2.0 ^ (intbits - 0x1)))))
173assert((0x1 < 1.1))
173assert((0x1 < 1.1))
174;
174;
175−assert(not (0x1 < 0.9))
175+assert((not (0x1 < 0.9)))
176assert((0x1 <= 1.1))
176assert((0x1 <= 1.1))
177;
177;
178−assert(not (0x1 <= 0.9))
178+assert((not (0x1 <= 0.9)))
179−assert(- (0x1 < - 0.9))
179+assert((- (0x1 < (- 0.9))))
180;
180;
181−assert(not (- (0x1 < - 1.1)))
181+assert((not (- (0x1 < (- 1.1)))))
182assert((0x1 <= 1.1))
182assert((0x1 <= 1.1))
183;
183;
184−assert(not (- (0x1 <= - 1.1)))
184+assert((not (- (0x1 <= (- 1.1)))))
185−assert(- (0x1 < - 0.9))
185+assert((- (0x1 < (- 0.9))))
186;
186;
187−assert(not (- (0x1 < - 1.1)))
187+assert((not (- (0x1 < (- 1.1)))))
188−assert(- (0x1 <= - 0.9))
188+assert((- (0x1 <= (- 0.9))))
189;
189;
190−assert(not (- (0x1 <= - 1.1)))
190+assert((not (- (0x1 <= (- 1.1)))))
191assert((minint <= (minint + 0.0)))
191assert((minint <= (minint + 0.0)))
192assert(((minint + 0.0) <= minint))
192assert(((minint + 0.0) <= minint))
193−assert(not (minint < (minint + 0.0)))
193+assert((not (minint < (minint + 0.0))))
194−assert(not ((minint + 0.0) < minint))
194+assert((not ((minint + 0.0) < minint)))
195−assert((maxint < (minint * - 1.0)))
195+assert((maxint < (minint * (- 1.0))))
196−assert((maxint <= (minint * - 1.0)))
196+assert((maxint <= (minint * (- 1.0))))
197do
197do
198local fmaxi1 = (0x2 ^ (intbits - 0x1))
198local fmaxi1 = (0x2 ^ (intbits - 0x1))
199assert((maxint < fmaxi1))
199assert((maxint < fmaxi1))
200assert((maxint <= fmaxi1))
200assert((maxint <= fmaxi1))
201−assert(not (fmaxi1 <= maxint))
201+assert((not (fmaxi1 <= maxint)))
202−assert((minint <= - (0x2 ^ (intbits - 0x1))))
202+assert((minint <= (- (0x2 ^ (intbits - 0x1)))))
203−assert(- ((0x2 ^ (intbits - 0x1)) <= minint))
203+assert((- ((0x2 ^ (intbits - 0x1)) <= minint)))
204end
204end
205if (floatbits < intbits) then
205if (floatbits < intbits) then
206print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
206print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
@@ -208,56 +208,56 @@ local fmax = (0x2 ^ floatbits)
208local ifmax = (fmax | 0x0)
208local ifmax = (fmax | 0x0)
209assert((fmax < (ifmax + 0x1)))
209assert((fmax < (ifmax + 0x1)))
210assert(((fmax - 0x1) < ifmax))
210assert(((fmax - 0x1) < ifmax))
211−assert(- ((fmax - 0x1) > - ifmax))
211+assert((- ((fmax - 0x1) > (- ifmax))))
212−assert(not (fmax <= (ifmax - 0x1)))
212+assert((not (fmax <= (ifmax - 0x1))))
213−assert(- (fmax > - (ifmax + 0x1)))
213+assert((- (fmax > (- (ifmax + 0x1)))))
214−assert(not (- (fmax >= - (ifmax - 0x1))))
214+assert((not (- (fmax >= (- (ifmax - 0x1))))))
215assert((((fmax / 0x2) - 0.5) < (ifmax // 0x2)))
215assert((((fmax / 0x2) - 0.5) < (ifmax // 0x2)))
216−assert(- (((fmax / 0x2) - 0.5) > - (ifmax // 0x2)))
216+assert((- (((fmax / 0x2) - 0.5) > (- (ifmax // 0x2)))))
217assert((maxint < (0x2 ^ intbits)))
217assert((maxint < (0x2 ^ intbits)))
218−assert((minint > - (0x2 ^ intbits)))
218+assert((minint > (- (0x2 ^ intbits))))
219assert((maxint <= (0x2 ^ intbits)))
219assert((maxint <= (0x2 ^ intbits)))
220−assert((minint >= - (0x2 ^ intbits)))
220+assert((minint >= (- (0x2 ^ intbits))))
221else
221else
222print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
222print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
223assert((maxint < (maxint + 1.0)))
223assert((maxint < (maxint + 1.0)))
224assert((maxint < (maxint + 0.5)))
224assert((maxint < (maxint + 0.5)))
225assert(((maxint - 1.0) < maxint))
225assert(((maxint - 1.0) < maxint))
226assert(((maxint - 0.5) < maxint))
226assert(((maxint - 0.5) < maxint))
227−assert(not ((maxint + 0.0) < maxint))
227+assert((not ((maxint + 0.0) < maxint)))
228assert(((maxint + 0.0) <= maxint))
228assert(((maxint + 0.0) <= maxint))
229−assert(not (maxint < (maxint + 0.0)))
229+assert((not (maxint < (maxint + 0.0))))
230assert(((maxint + 0.0) <= maxint))
230assert(((maxint + 0.0) <= maxint))
231assert((maxint <= (maxint + 0.0)))
231assert((maxint <= (maxint + 0.0)))
232−assert(not ((maxint + 1.0) <= maxint))
232+assert((not ((maxint + 1.0) <= maxint)))
233−assert(not ((maxint + 0.5) <= maxint))
233+assert((not ((maxint + 0.5) <= maxint)))
234−assert(not (maxint <= (maxint - 1.0)))
234+assert((not (maxint <= (maxint - 1.0))))
235−assert(not (maxint <= (maxint - 0.5)))
235+assert((not (maxint <= (maxint - 0.5))))
236assert((minint < (minint + 1.0)))
236assert((minint < (minint + 1.0)))
237assert((minint < (minint + 0.5)))
237assert((minint < (minint + 0.5)))
238assert((minint <= (minint + 0.5)))
238assert((minint <= (minint + 0.5)))
239assert(((minint - 1.0) < minint))
239assert(((minint - 1.0) < minint))
240assert(((minint - 1.0) <= minint))
240assert(((minint - 1.0) <= minint))
241−assert(not ((minint + 0.0) < minint))
241+assert((not ((minint + 0.0) < minint)))
242−assert(not ((minint + 0.5) < minint))
242+assert((not ((minint + 0.5) < minint)))
243−assert(not (minint < (minint + 0.0)))
243+assert((not (minint < (minint + 0.0))))
244assert(((minint + 0.0) <= minint))
244assert(((minint + 0.0) <= minint))
245assert((minint <= (minint + 0.0)))
245assert((minint <= (minint + 0.0)))
246−assert(not ((minint + 1.0) <= minint))
246+assert((not ((minint + 1.0) <= minint)))
247−assert(not ((minint + 0.5) <= minint))
247+assert((not ((minint + 0.5) <= minint)))
248−assert(not (minint <= (minint - 1.0)))
248+assert((not (minint <= (minint - 1.0))))
249end
249end
250do
250do
251local NaN <const> = (0x0 / 0x0)
251local NaN <const> = (0x0 / 0x0)
252−assert(not (NaN < 0x0))
252+assert((not (NaN < 0x0)))
253−assert(not (NaN > minint))
253+assert((not (NaN > minint)))
254−assert(not (NaN <= - 0x9))
254+assert((not (NaN <= (- 0x9))))
255−assert(not (NaN <= maxint))
255+assert((not (NaN <= maxint)))
256−assert(not (NaN < maxint))
256+assert((not (NaN < maxint)))
257−assert(not (minint <= NaN))
257+assert((not (minint <= NaN)))
258−assert(not (minint < NaN))
258+assert((not (minint < NaN)))
259−assert(not (0x4 <= NaN))
259+assert((not (0x4 <= NaN)))
260−assert(not (0x4 < NaN))
260+assert((not (0x4 < NaN)))
261end
261end
262local function checkcompt
262local function checkcompt
263(msg,code)
263(msg,code)
@@ -274,14 +274,14 @@ local function f2i
274return (x | x)
274return (x | x)
275end
275end
276checkerror(msgf2i,f2i,math.huge)
276checkerror(msgf2i,f2i,math.huge)
277−checkerror(msgf2i,f2i,- math.huge)
277+checkerror(msgf2i,f2i,(- math.huge))
278checkerror(msgf2i,f2i,(0x0 / 0x0))
278checkerror(msgf2i,f2i,(0x0 / 0x0))
279if (floatbits < intbits) then
279if (floatbits < intbits) then
280assert(((maxint + 1.0) == (maxint + 0.0)))
280assert(((maxint + 1.0) == (maxint + 0.0)))
281assert(((minint - 1.0) == (minint + 0.0)))
281assert(((minint - 1.0) == (minint + 0.0)))
282checkerror(msgf2i,f2i,(maxint + 0.0))
282checkerror(msgf2i,f2i,(maxint + 0.0))
283assert((f2i((2.0 ^ (intbits - 0x2))) == (0x1 << (intbits - 0x2))))
283assert((f2i((2.0 ^ (intbits - 0x2))) == (0x1 << (intbits - 0x2))))
284−assert((f2i(- (2.0 ^ (intbits - 0x2))) == - (0x1 << (intbits - 0x2))))
284+assert((f2i((- (2.0 ^ (intbits - 0x2)))) == (- (0x1 << (intbits - 0x2)))))
285assert(((((2.0 ^ (floatbits - 0x1)) + 1.0) // 0x1) == ((0x1 << (floatbits - 0x1)) + 0x1)))
285assert(((((2.0 ^ (floatbits - 0x1)) + 1.0) // 0x1) == ((0x1 << (floatbits - 0x1)) + 0x1)))
286local mf = ((maxint - (0x1 << (floatbits - intbits))) + 0x1)
286local mf = ((maxint - (0x1 << (floatbits - intbits))) + 0x1)
287assert((f2i((mf + 0.0)) == mf))
287assert((f2i((mf + 0.0)) == mf))
@@ -297,8 +297,8 @@ end
297assert((f2i((minint + 0.0)) == minint))
297assert((f2i((minint + 0.0)) == minint))
298assert((("\u{32}" + 0x1) == 0x3))
298assert((("\u{32}" + 0x1) == 0x3))
299assert((("\u{32}\u{20}" + 0x1) == 0x3))
299assert((("\u{32}\u{20}" + 0x1) == 0x3))
300−assert((("\u{20}\u{2d}\u{32}\u{20}" + 0x1) == - 0x1))
300+assert((("\u{20}\u{2d}\u{32}\u{20}" + 0x1) == (- 0x1)))
301−assert((("\u{20}\u{2d}\u{30}\u{78}\u{61}\u{20}" + 0x1) == - 0x9))
301+assert((("\u{20}\u{2d}\u{30}\u{78}\u{61}\u{20}" + 0x1) == (- 0x9)))
302do
302do
303assert(eqT(tonumber(tostring(maxint)),maxint))
303assert(eqT(tonumber(tostring(maxint)),maxint))
304assert(eqT(tonumber(tostring(minint)),minint))
304assert(eqT(tonumber(tostring(minint)),minint))
@@ -314,49 +314,49 @@ end
314assert(eqT(tonumber(incd(maxint)),(maxint + 1.0)))
314assert(eqT(tonumber(incd(maxint)),(maxint + 1.0)))
315assert(eqT(tonumber(incd(minint)),(minint - 1.0)))
315assert(eqT(tonumber(incd(minint)),(minint - 1.0)))
316assert(eqT(tonumber(("\u{31}" .. string.rep("\u{30}",0x1e))),1e30))
316assert(eqT(tonumber(("\u{31}" .. string.rep("\u{30}",0x1e))),1e30))
317−assert(eqT(tonumber(("\u{2d}\u{31}" .. string.rep("\u{30}",0x1e))),- 1e30))
317+assert(eqT(tonumber(("\u{2d}\u{31}" .. string.rep("\u{30}",0x1e))),(- 1e30)))
318assert(eqT(tonumber(("\u{30}\u{78}\u{31}" .. string.rep("\u{30}",0x1e))),0x0))
318assert(eqT(tonumber(("\u{30}\u{78}\u{31}" .. string.rep("\u{30}",0x1e))),0x0))
319assert((minint == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. minint))()))
319assert((minint == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. minint))()))
320assert(eqT(maxint,load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. maxint))()))
320assert(eqT(maxint,load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. maxint))()))
321assert(eqT(1e22,1e22))
321assert(eqT(1e22,1e22))
322−assert(eqT(- 1e22,- 1e22))
322+assert(eqT((- 1e22),(- 1e22)))
323end
323end
324assert((tonumber(3.4) == 3.4))
324assert((tonumber(3.4) == 3.4))
325assert(eqT(tonumber(0x3),0x3))
325assert(eqT(tonumber(0x3),0x3))
326assert((eqT(tonumber(maxint),maxint) and eqT(tonumber(minint),minint)))
326assert((eqT(tonumber(maxint),maxint) and eqT(tonumber(minint),minint)))
327assert((tonumber((0x1 / 0x0)) == (0x1 / 0x0)))
327assert((tonumber((0x1 / 0x0)) == (0x1 / 0x0)))
328assert((tonumber("\u{30}") == 0x0))
328assert((tonumber("\u{30}") == 0x0))
329−assert(not tonumber(""))
329+assert((not tonumber("")))
330−assert(not tonumber("\u{20}\u{20}"))
330+assert((not tonumber("\u{20}\u{20}")))
331−assert(not tonumber("\u{2d}"))
331+assert((not tonumber("\u{2d}")))
332−assert(not tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{20}"))
332+assert((not tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{20}")))
333−assert(not tonumber({}))
333+assert((not tonumber({})))
334−assert(((((tonumber("\u{2b}\u{30}\u{2e}\u{30}\u{31}") == (0x1 / 0x64)) and (tonumber("\u{2b}\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2d}\u{31}\u{2e}") == - (0x1 and (tonumber("\u{2b}\u{31}\u{2e}") == 0x1)))))
334+assert(((((tonumber("\u{2b}\u{30}\u{2e}\u{30}\u{31}") == (0x1 / 0x64)) and (tonumber("\u{2b}\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2d}\u{31}\u{2e}") == (- (0x1 and (tonumber("\u{2b}\u{31}\u{2e}") == 0x1))))))
335−assert(not (tonumber("\u{2b}\u{20}\u{30}\u{2e}\u{30}\u{31}") and not (tonumber("\u{2b}\u{2e}\u{65}\u{31}") and not (tonumber("\u{31}\u{65}") and not (tonumber("\u{31}\u{2e}\u{30}\u{65}\u{2b}") and not tonumber("\u{2e}"))))))
335+assert((not (tonumber("\u{2b}\u{20}\u{30}\u{2e}\u{30}\u{31}") and (not (tonumber("\u{2b}\u{2e}\u{65}\u{31}") and (not (tonumber("\u{31}\u{65}") and (not (tonumber("\u{31}\u{2e}\u{30}\u{65}\u{2b}") and (not tonumber("\u{2e}")))))))))))
336−assert((tonumber("\u{2d}\u{30}\u{31}\u{32}") == - (0xa - 0x2)))
336+assert((tonumber("\u{2d}\u{30}\u{31}\u{32}") == (- (0xa - 0x2))))
337−assert((tonumber("\u{2d}\u{31}\u{2e}\u{32}\u{65}\u{32}") == - - - 0x78))
337+assert((tonumber("\u{2d}\u{31}\u{2e}\u{32}\u{65}\u{32}") == (- (- (- 0x78)))))
338assert((tonumber("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}") == ((0x1 << (0x4 * 0xc)) - 0x1)))
338assert((tonumber("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}") == ((0x1 << (0x4 * 0xc)) - 0x1)))
339−assert((tonumber(("\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == - 0x1))
339+assert((tonumber(("\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == (- 0x1)))
340assert((tonumber(("\u{2d}\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == 0x1))
340assert((tonumber(("\u{2d}\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == 0x1))
341assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == 0xa))
341assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == 0xa))
342assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0xa) == 0x3f2))
342assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0xa) == 0x3f2))
343−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == - 0xa))
343+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == (- 0xa)))
344assert((tonumber("\u{31}\u{30}",0x24) == 0x24))
344assert((tonumber("\u{31}\u{30}",0x24) == 0x24))
345−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{20}\u{20}",0x24) == - 0x24))
345+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{20}\u{20}",0x24) == (- 0x24)))
346assert((tonumber("\u{20}\u{20}\u{2b}\u{31}\u{5a}\u{20}\u{20}",0x24) == (0x24 + 0x23)))
346assert((tonumber("\u{20}\u{20}\u{2b}\u{31}\u{5a}\u{20}\u{20}",0x24) == (0x24 + 0x23)))
347−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{7a}\u{20}\u{20}",0x24) == - (0x24 + - 0x23)))
347+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{7a}\u{20}\u{20}",0x24) == (- (0x24 + (- 0x23)))))
348−assert((tonumber("\u{2d}\u{66}\u{46}\u{66}\u{61}",0x10) == - (0xa + (0x10 * (0xf + (0x10 * (0xf + (0x10 * 0xf))))))))
348+assert((tonumber("\u{2d}\u{66}\u{46}\u{66}\u{61}",0x10) == (- (0xa + (0x10 * (0xf + (0x10 * (0xf + (0x10 * 0xf)))))))))
349assert(((tonumber(string.rep("\u{31}",(intbits - 0x2)),0x2) + 0x1) == (0x2 ^ (intbits - 0x2))))
349assert(((tonumber(string.rep("\u{31}",(intbits - 0x2)),0x2) + 0x1) == (0x2 ^ (intbits - 0x2))))
350assert(((tonumber("\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
350assert(((tonumber("\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
351assert(((tonumber("\u{30}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
351assert(((tonumber("\u{30}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
352−assert(((tonumber("\u{2d}\u{30}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) - 0x1) == - (0x1 << 0x28)))
352+assert(((tonumber("\u{2d}\u{30}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) - 0x1) == (- (0x1 << 0x28))))
353for i = 0x2, 0x24
353for i = 0x2, 0x24
354do
354do
355local i2 = (i * i)
355local i2 = (i * i)
356local i10 = ((((i2 * i2) * i2) * i2) * i2)
356local i10 = ((((i2 * i2) * i2) * i2) * i2)
357assert((tonumber("\u{9}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{9}",i) == i10))
357assert((tonumber("\u{9}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{9}",i) == i10))
358end
358end
359−if not _soft then
359+if (not _soft) then
360assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0xd) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0xd)) - 0x1)))
360assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0xd) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0xd)) - 0x1)))
361assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x96) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x96)) - 0x1)))
361assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x96) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x96)) - 0x1)))
362assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x12c) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x12c)) - 0x1)))
362assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x12c) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x12c)) - 0x1)))
@@ -373,53 +373,53 @@ end
373local function f
373local function f
374(...)
374(...)
375if (select("\u{23}",...) == 0x1) then
375if (select("\u{23}",...) == 0x1) then
376−return (...)
376+return ...
377else
377else
378return "\u{2a}\u{2a}\u{2a}"
378return "\u{2a}\u{2a}\u{2a}"
379end
379end
380end
380end
381−assert(not f(tonumber("\u{66}\u{46}\u{66}\u{61}",0xf)))
381+assert((not f(tonumber("\u{66}\u{46}\u{66}\u{61}",0xf))))
382−assert(not f(tonumber("\u{30}\u{39}\u{39}",0x8)))
382+assert((not f(tonumber("\u{30}\u{39}\u{39}",0x8))))
383−assert(not f(tonumber("\u{31}\u{0}",0x2)))
383+assert((not f(tonumber("\u{31}\u{0}",0x2))))
384−assert(not f(tonumber("",0x8)))
384+assert((not f(tonumber("",0x8))))
385−assert(not f(tonumber("\u{20}\u{20}",0x9)))
385+assert((not f(tonumber("\u{20}\u{20}",0x9))))
386−assert(not f(tonumber("\u{20}\u{20}",0x9)))
386+assert((not f(tonumber("\u{20}\u{20}",0x9))))
387−assert(not f(tonumber("\u{30}\u{78}\u{66}",0xa)))
387+assert((not f(tonumber("\u{30}\u{78}\u{66}",0xa))))
388−assert(not f(tonumber("\u{69}\u{6e}\u{66}")))
388+assert((not f(tonumber("\u{69}\u{6e}\u{66}"))))
389−assert(not f(tonumber("\u{20}\u{49}\u{4e}\u{46}\u{20}")))
389+assert((not f(tonumber("\u{20}\u{49}\u{4e}\u{46}\u{20}"))))
390−assert(not f(tonumber("\u{4e}\u{61}\u{6e}")))
390+assert((not f(tonumber("\u{4e}\u{61}\u{6e}"))))
391−assert(not f(tonumber("\u{6e}\u{61}\u{6e}")))
391+assert((not f(tonumber("\u{6e}\u{61}\u{6e}"))))
392−assert(not f(tonumber("\u{20}\u{20}")))
392+assert((not f(tonumber("\u{20}\u{20}"))))
393−assert(not f(tonumber("")))
393+assert((not f(tonumber(""))))
394−assert(not f(tonumber("\u{31}\u{20}\u{20}\u{61}")))
394+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}"))))
395−assert(not f(tonumber("\u{31}\u{20}\u{20}\u{61}",0x2)))
395+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}",0x2))))
396−assert(not f(tonumber("\u{31}\u{0}")))
396+assert((not f(tonumber("\u{31}\u{0}"))))
397−assert(not f(tonumber("\u{31}\u{20}\u{0}")))
397+assert((not f(tonumber("\u{31}\u{20}\u{0}"))))
398−assert(not f(tonumber("\u{31}\u{0}\u{20}")))
398+assert((not f(tonumber("\u{31}\u{0}\u{20}"))))
399−assert(not f(tonumber("\u{65}\u{31}")))
399+assert((not f(tonumber("\u{65}\u{31}"))))
400−assert(not f(tonumber("\u{65}\u{20}\u{20}\u{31}")))
400+assert((not f(tonumber("\u{65}\u{20}\u{20}\u{31}"))))
401−assert(not f(tonumber("\u{20}\u{33}\u{2e}\u{34}\u{2e}\u{35}\u{20}")))
401+assert((not f(tonumber("\u{20}\u{33}\u{2e}\u{34}\u{2e}\u{35}\u{20}"))))
402−assert(not tonumber("\u{30}\u{78}"))
402+assert((not tonumber("\u{30}\u{78}")))
403−assert(not tonumber("\u{78}"))
403+assert((not tonumber("\u{78}")))
404−assert(not tonumber("\u{78}\u{33}"))
404+assert((not tonumber("\u{78}\u{33}")))
405−assert(not tonumber("\u{30}\u{78}\u{33}\u{2e}\u{33}\u{2e}\u{33}"))
405+assert((not tonumber("\u{30}\u{78}\u{33}\u{2e}\u{33}\u{2e}\u{33}")))
406−assert(not tonumber("\u{30}\u{30}\u{78}\u{32}"))
406+assert((not tonumber("\u{30}\u{30}\u{78}\u{32}")))
407−assert(not tonumber("\u{30}\u{78}\u{20}\u{32}"))
407+assert((not tonumber("\u{30}\u{78}\u{20}\u{32}")))
408−assert(not tonumber("\u{30}\u{20}\u{78}\u{32}"))
408+assert((not tonumber("\u{30}\u{20}\u{78}\u{32}")))
409−assert(not tonumber("\u{32}\u{33}\u{78}"))
409+assert((not tonumber("\u{32}\u{33}\u{78}")))
410−assert(not tonumber("\u{2d}\u{20}\u{30}\u{78}\u{61}\u{61}"))
410+assert((not tonumber("\u{2d}\u{20}\u{30}\u{78}\u{61}\u{61}")))
411−assert(not tonumber("\u{2d}\u{30}\u{78}\u{61}\u{61}\u{50}\u{20}"))
411+assert((not tonumber("\u{2d}\u{30}\u{78}\u{61}\u{61}\u{50}\u{20}")))
412−assert(not tonumber("\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}"))
412+assert((not tonumber("\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}")))
413−assert(not tonumber("\u{30}\u{78}\u{35}\u{70}\u{2b}\u{2d}\u{32}"))
413+assert((not tonumber("\u{30}\u{78}\u{35}\u{70}\u{2b}\u{2d}\u{32}")))
414assert((((0x10 == 0x10) and (0xfff == ((0x2 ^ 0xc) - 0x1))) and (0xfb == 0xfb)))
414assert((((0x10 == 0x10) and (0xfff == ((0x2 ^ 0xc) - 0x1))) and (0xfb == 0xfb)))
415assert(((0.0 == 0x0) and (0.0 == 0x0)))
415assert(((0.0 == 0x0) and (0.0 == 0x0)))
416assert((0xffffffff == ((0x1 << 0x20) - 0x1)))
416assert((0xffffffff == ((0x1 << 0x20) - 0x1)))
417assert((tonumber("\u{2b}\u{30}\u{78}\u{32}") == 0x2))
417assert((tonumber("\u{2b}\u{30}\u{78}\u{32}") == 0x2))
418−assert((tonumber("\u{2d}\u{30}\u{78}\u{61}\u{41}") == - 0xaa))
418+assert((tonumber("\u{2d}\u{30}\u{78}\u{61}\u{41}") == (- 0xaa)))
419−assert((tonumber("\u{2d}\u{30}\u{78}\u{66}\u{66}\u{46}\u{46}\u{46}\u{66}\u{66}\u{66}") == - ((0x1 << 0x20) + 0x1)))
419+assert((tonumber("\u{2d}\u{30}\u{78}\u{66}\u{66}\u{46}\u{46}\u{46}\u{66}\u{66}\u{66}") == (- ((0x1 << 0x20) + 0x1))))
420assert((((0.0 == 0x0) and ((0xe + 0x1) == 0xf)) and ((0xe - 0x1) == 0xd)))
420assert((((0.0 == 0x0) and ((0xe + 0x1) == 0xf)) and ((0xe - 0x1) == 0xd)))
421assert((tonumber("\u{20}\u{20}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (0x25 / 0x10)))
421assert((tonumber("\u{20}\u{20}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (0x25 / 0x10)))
422−assert((tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == - (0x25 / 0x10)))
422+assert((tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (- (0x25 / 0x10))))
423assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}\u{2b}\u{38}\u{20}\u{20}") == 0x51))
423assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}\u{2b}\u{38}\u{20}\u{20}") == 0x51))
424assert((0.9999999997671694 == (0x1 - "\u{30}\u{78}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}")))
424assert((0.9999999997671694 == (0x1 - "\u{30}\u{78}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}")))
425assert((("\u{30}\u{78}\u{41}\u{2e}\u{61}" + 0x0) == (0xa + (0xa / 0x10))))
425assert((("\u{30}\u{78}\u{41}\u{2e}\u{61}" + 0x0) == (0xa + (0xa / 0x10))))
@@ -435,44 +435,44 @@ assert(((tonumber("\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}"
435assert(((1e-31 > 9e-32) and (9e29 < 1e30)))
435assert(((1e-31 > 9e-32) and (9e29 < 1e30)))
436assert((0.123456 > 0.123455))
436assert((0.123456 > 0.123455))
437assert((tonumber("\u{2b}\u{31}\u{2e}\u{32}\u{33}\u{45}\u{31}\u{38}") == (1.23 * (10.0 ^ 0x12))))
437assert((tonumber("\u{2b}\u{31}\u{2e}\u{32}\u{33}\u{45}\u{31}\u{38}") == (1.23 * (10.0 ^ 0x12))))
438−assert(not (((0x1 < 0x1) and (0x1 < 0x2)) and not (0x2 < 0x1)))
438+assert((not (((0x1 < 0x1) and (0x1 < 0x2)) and (not (0x2 < 0x1)))))
439−assert(not ((("\u{61}" < "\u{61}") and ("\u{61}" < "\u{62}")) and not ("\u{62}" < "\u{61}")))
439+assert((not ((("\u{61}" < "\u{61}") and ("\u{61}" < "\u{62}")) and (not ("\u{62}" < "\u{61}")))))
440−assert((((0x1 <= 0x1) and (0x1 <= 0x2)) and not (0x2 <= 0x1)))
440+assert((((0x1 <= 0x1) and (0x1 <= 0x2)) and (not (0x2 <= 0x1))))
441−assert(((("\u{61}" <= "\u{61}") and ("\u{61}" <= "\u{62}")) and not ("\u{62}" <= "\u{61}")))
441+assert(((("\u{61}" <= "\u{61}") and ("\u{61}" <= "\u{62}")) and (not ("\u{62}" <= "\u{61}"))))
442−assert(not ((0x1 > 0x1) and not ((0x1 > 0x2) and (0x2 > 0x1))))
442+assert((not ((0x1 > 0x1) and (not ((0x1 > 0x2) and (0x2 > 0x1))))))
443−assert(not (("\u{61}" > "\u{61}") and not (("\u{61}" > "\u{62}") and ("\u{62}" > "\u{61}"))))
443+assert((not (("\u{61}" > "\u{61}") and (not (("\u{61}" > "\u{62}") and ("\u{62}" > "\u{61}"))))))
444−assert(((0x1 >= 0x1) and not ((0x1 >= 0x2) and (0x2 >= 0x1))))
444+assert(((0x1 >= 0x1) and (not ((0x1 >= 0x2) and (0x2 >= 0x1)))))
445−assert((("\u{61}" >= "\u{61}") and not (("\u{61}" >= "\u{62}") and ("\u{62}" >= "\u{61}"))))
445+assert((("\u{61}" >= "\u{61}") and (not (("\u{61}" >= "\u{62}") and ("\u{62}" >= "\u{61}")))))
446−assert((((1.3 < 1.4) and (1.3 <= 1.4)) and not ((1.3 < 1.3) and (1.3 <= 1.3))))
446+assert((((1.3 < 1.4) and (1.3 <= 1.4)) and (not ((1.3 < 1.3) and (1.3 <= 1.3)))))
447−assert(eqT(- (0x4 % 0x3),0x2))
447+assert(eqT((- (0x4 % 0x3)),0x2))
448−assert(eqT((0x4 % - 0x3),- 0x2))
448+assert(eqT((0x4 % (- 0x3)),(- 0x2)))
449−assert(eqT(- (4.0 % 0x3),2.0))
449+assert(eqT((- (4.0 % 0x3)),2.0))
450−assert(eqT((0x4 % - 3.0),- 2.0))
450+assert(eqT((0x4 % (- 3.0)),(- 2.0)))
451−assert(eqT((0x4 % - 0x5),- 0x1))
451+assert(eqT((0x4 % (- 0x5)),(- 0x1)))
452−assert(eqT((0x4 % - 5.0),- 1.0))
452+assert(eqT((0x4 % (- 5.0)),(- 1.0)))
453assert(eqT((0x4 % 0x5),0x4))
453assert(eqT((0x4 % 0x5),0x4))
454assert(eqT((0x4 % 5.0),4.0))
454assert(eqT((0x4 % 5.0),4.0))
455−assert(eqT(- (0x4 % - 0x5),- 0x4))
455+assert(eqT((- (0x4 % (- 0x5))),(- 0x4)))
456−assert(eqT(- (0x4 % - 5.0),- 4.0))
456+assert(eqT((- (0x4 % (- 5.0))),(- 4.0)))
457−assert(eqT(- (0x4 % 0x5),0x1))
457+assert(eqT((- (0x4 % 0x5)),0x1))
458−assert(eqT(- (0x4 % 5.0),1.0))
458+assert(eqT((- (0x4 % 5.0)),1.0))
459assert(eqT((4.25 % 0x4),0.25))
459assert(eqT((4.25 % 0x4),0.25))
460assert(eqT((10.0 % 0x2),0.0))
460assert(eqT((10.0 % 0x2),0.0))
461−assert(eqT(- (10.0 % 0x2),0.0))
461+assert(eqT((- (10.0 % 0x2)),0.0))
462−assert(eqT(- (10.0 % - 0x2),0.0))
462+assert(eqT((- (10.0 % (- 0x2))),0.0))
463assert(((math.pi - (math.pi % 0x1)) == 0x3))
463assert(((math.pi - (math.pi % 0x1)) == 0x3))
464assert(((math.pi - (math.pi % 1e-3)) == 3.141))
464assert(((math.pi - (math.pi % 1e-3)) == 3.141))
465do
465do
466local i,j = 0x0,0x4e20
466local i,j = 0x0,0x4e20
467while (i < j) do
467while (i < j) do
468local m = ((i + j) // 0x2)
468local m = ((i + j) // 0x2)
469−if (0xa ^ - (m > 0x0)) then
469+if (0xa ^ (- (m > 0x0))) then
470i=(m + 0x1)
470i=(m + 0x1)
471else
471else
472j=m
472j=m
473end
473end
474end
474end
475−local b = (0xa ^ - (i - (i // 0xa)))
475+local b = (0xa ^ (- (i - (i // 0xa))))
476assert(((b > 0x0) and ((b * b) == 0x0)))
476assert(((b > 0x0) and ((b * b) == 0x0)))
477local delta = (b / 0x3e8)
477local delta = (b / 0x3e8)
478assert(eq(((2.1 * b) % (0x2 * b)),(0.1 * b),delta))
478assert(eq(((2.1 * b) % (0x2 * b)),(0.1 * b),delta))
@@ -480,9 +480,9 @@ assert(eq(((- (2.1 * b)) % (0x2 * b)),((0x2 * b) - (0.1 * b)),delta))
480assert(eq(((2.1 * b) % (- (0x2 * b))),((0.1 * b) - (0x2 * b)),delta))
480assert(eq(((2.1 * b) % (- (0x2 * b))),((0.1 * b) - (0x2 * b)),delta))
481assert(eq(((- (2.1 * b)) % (- (0x2 * b))),(- (0.1 * b)),delta))
481assert(eq(((- (2.1 * b)) % (- (0x2 * b))),(- (0.1 * b)),delta))
482end
482end
483−for i = - 0xa, 0xa
483+for i = (- 0xa), 0xa
484do
484do
485−for j = - 0xa, 0xa
485+for j = (- 0xa), 0xa
486do
486do
487if (j ~= 0x0) then
487if (j ~= 0x0) then
488assert((((i + 0.0) % j) == (i % j)))
488assert((((i + 0.0) % j) == (i % j)))
@@ -491,7 +491,7 @@ end
491end
491end
492for i = 0x0, 0xa
492for i = 0x0, 0xa
493do
493do
494−for j = - 0xa, 0xa
494+for j = (- 0xa), 0xa
495do
495do
496if (j ~= 0x0) then
496if (j ~= 0x0) then
497assert((((0x2 ^ i) % j) == ((0x1 << i) % j)))
497assert((((0x2 ^ i) % j) == ((0x1 << i) % j)))
@@ -515,10 +515,10 @@ assert(eqT((maxint % maxint),0x0))
515assert((((minint + 0x1) % minint) == (minint + 0x1)))
515assert((((minint + 0x1) % minint) == (minint + 0x1)))
516assert((((maxint - 0x1) % maxint) == (maxint - 0x1)))
516assert((((maxint - 0x1) % maxint) == (maxint - 0x1)))
517assert(((minint % maxint) == (maxint - 0x1)))
517assert(((minint % maxint) == (maxint - 0x1)))
518−assert((minint % - (0x1 == 0x0)))
518+assert((minint % (- (0x1 == 0x0))))
519−assert((minint % - (0x2 == 0x0)))
519+assert((minint % (- (0x2 == 0x0))))
520−assert((maxint % - (0x2 == - 0x1)))
520+assert((maxint % (- (0x2 == (- 0x1)))))
521−if not _port then
521+if (not _port) then
522local function anan
522local function anan
523(x)
523(x)
524assert(isNaN(x))
524assert(isNaN(x))
@@ -527,30 +527,30 @@ anan((0.0 % 0x0))
527anan((1.3 % 0x0))
527anan((1.3 % 0x0))
528anan((math.huge % 0x1))
528anan((math.huge % 0x1))
529anan((math.huge % 1e30))
529anan((math.huge % 1e30))
530−anan(- (math.huge % 1e30))
530+anan((- (math.huge % 1e30)))
531−anan(- (math.huge % - 1e30))
531+anan((- (math.huge % (- 1e30))))
532assert(((0x1 % math.huge) == 0x1))
532assert(((0x1 % math.huge) == 0x1))
533assert(((1e30 % math.huge) == 1e30))
533assert(((1e30 % math.huge) == 1e30))
534−assert((1e30 % - (math.huge == - math.huge)))
534+assert((1e30 % (- (math.huge == (- math.huge)))))
535−assert(- ((0x1 % math.huge) == math.huge))
535+assert((- ((0x1 % math.huge) == math.huge)))
536−assert(- (0x1 % - (math.huge == - 0x1)))
536+assert((- (0x1 % (- (math.huge == (- 0x1))))))
537end
537end
538assert(math.ult(0x3,0x4))
538assert(math.ult(0x3,0x4))
539−assert(not math.ult(0x4,0x4))
539+assert((not math.ult(0x4,0x4)))
540−assert(math.ult(- 0x2,- 0x1))
540+assert(math.ult((- 0x2),(- 0x1)))
541−assert(math.ult(0x2,- 0x1))
541+assert(math.ult(0x2,(- 0x1)))
542−assert(not math.ult(- 0x2,- 0x2))
542+assert((not math.ult((- 0x2),(- 0x2))))
543assert(math.ult(maxint,minint))
543assert(math.ult(maxint,minint))
544−assert(not math.ult(minint,maxint))
544+assert((not math.ult(minint,maxint)))
545−assert(eq(((math.sin(- 9.8) ^ 0x2) + (math.cos(- 9.8) ^ 0x2)),0x1))
545+assert(eq(((math.sin((- 9.8)) ^ 0x2) + (math.cos((- 9.8)) ^ 0x2)),0x1))
546assert(eq(math.tan((math.pi / 0x4)),0x1))
546assert(eq(math.tan((math.pi / 0x4)),0x1))
547assert((eq(math.sin((math.pi / 0x2)),0x1) and eq(math.cos((math.pi / 0x2)),0x0)))
547assert((eq(math.sin((math.pi / 0x2)),0x1) and eq(math.cos((math.pi / 0x2)),0x0)))
548assert(((eq(math.atan(0x1),(math.pi / 0x4)) and eq(math.acos(0x0),(math.pi / 0x2))) and eq(math.asin(0x1),(math.pi / 0x2))))
548assert(((eq(math.atan(0x1),(math.pi / 0x4)) and eq(math.acos(0x0),(math.pi / 0x2))) and eq(math.asin(0x1),(math.pi / 0x2))))
549assert((eq(math.deg((math.pi / 0x2)),0x5a) and eq(math.rad(0x5a),(math.pi / 0x2))))
549assert((eq(math.deg((math.pi / 0x2)),0x5a) and eq(math.rad(0x5a),(math.pi / 0x2))))
550−assert((math.abs(- 10.43) == 10.43))
550+assert((math.abs((- 10.43)) == 10.43))
551assert(eqT(math.abs(minint),minint))
551assert(eqT(math.abs(minint),minint))
552assert(eqT(math.abs(maxint),maxint))
552assert(eqT(math.abs(maxint),maxint))
553−assert(eqT(math.abs(- maxint),maxint))
553+assert(eqT(math.abs((- maxint)),maxint))
554assert(eq(math.atan(0x1,0x0),(math.pi / 0x2)))
554assert(eq(math.atan(0x1,0x0),(math.pi / 0x2)))
555assert((math.fmod(0xa,0x3) == 0x1))
555assert((math.fmod(0xa,0x3) == 0x1))
556assert(eq((math.sqrt(0xa) ^ 0x2),0xa))
556assert(eq((math.sqrt(0xa) ^ 0x2),0xa))
@@ -560,15 +560,15 @@ assert(eq(math.log(0x9,0x3),0x2))
560assert(eq(math.exp(0x0),0x1))
560assert(eq(math.exp(0x0),0x1))
561assert(eq(math.sin(0xa),math.sin((0xa % (0x2 * math.pi)))))
561assert(eq(math.sin(0xa),math.sin((0xa % (0x2 * math.pi)))))
562assert((tonumber("\u{20}\u{31}\u{2e}\u{33}\u{65}\u{2d}\u{32}\u{20}") == 0.013))
562assert((tonumber("\u{20}\u{31}\u{2e}\u{33}\u{65}\u{2d}\u{32}\u{20}") == 0.013))
563−assert((tonumber("\u{20}\u{2d}\u{31}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{20}") == - 1.00000000000001))
563+assert((tonumber("\u{20}\u{2d}\u{31}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{20}") == (- 1.00000000000001)))
564−assert((0x800001 + - (0x800001 == 0x0)))
564+assert((0x800001 + (- (0x800001 == 0x0))))
565−assert((0x800000 + - (0x800000 == 0x0)))
565+assert((0x800000 + (- (0x800000 == 0x0))))
566−assert((0x7fffff + - (0x7fffff == 0x0)))
566+assert((0x7fffff + (- (0x7fffff == 0x0))))
567do
567do
568assert(eqT(math.floor(3.4),0x3))
568assert(eqT(math.floor(3.4),0x3))
569assert(eqT(math.ceil(3.4),0x4))
569assert(eqT(math.ceil(3.4),0x4))
570−assert(eqT(math.floor(- 3.4),- 0x4))
570+assert(eqT(math.floor((- 3.4)),(- 0x4)))
571−assert(eqT(math.ceil(- 3.4),- 0x3))
571+assert(eqT(math.ceil((- 3.4)),(- 0x3)))
572assert(eqT(math.floor(maxint),maxint))
572assert(eqT(math.floor(maxint),maxint))
573assert(eqT(math.ceil(maxint),maxint))
573assert(eqT(math.ceil(maxint),maxint))
574assert(eqT(math.floor(minint),minint))
574assert(eqT(math.floor(minint),minint))
@@ -577,8 +577,8 @@ assert(eqT(math.ceil(minint),minint))
577assert(eqT(math.ceil((minint + 0.0)),minint))
577assert(eqT(math.ceil((minint + 0.0)),minint))
578assert((math.floor(1e50) == 1e50))
578assert((math.floor(1e50) == 1e50))
579assert((math.ceil(1e50) == 1e50))
579assert((math.ceil(1e50) == 1e50))
580−assert((math.floor(- 1e50) == - 1e50))
580+assert((math.floor((- 1e50)) == (- 1e50)))
581−assert((math.ceil(- 1e50) == - 1e50))
581+assert((math.ceil((- 1e50)) == (- 1e50)))
582for _,p in pairs({0x1f,0x20,0x3f,0x40})
582for _,p in pairs({0x1f,0x20,0x3f,0x40})
583do
583do
584assert((math.floor((0x2 ^ p)) == (0x2 ^ p)))
584assert((math.floor((0x2 ^ p)) == (0x2 ^ p)))
@@ -593,23 +593,23 @@ assert(eqT(math.tointeger((minint .. "")),minint))
593assert(eqT(math.tointeger(maxint),maxint))
593assert(eqT(math.tointeger(maxint),maxint))
594assert(eqT(math.tointeger((maxint .. "")),maxint))
594assert(eqT(math.tointeger((maxint .. "")),maxint))
595assert(eqT(math.tointeger((minint + 0.0)),minint))
595assert(eqT(math.tointeger((minint + 0.0)),minint))
596−assert(not math.tointeger((0.0 - minint)))
596+assert((not math.tointeger((0.0 - minint))))
597−assert(not math.tointeger(math.pi))
597+assert((not math.tointeger(math.pi)))
598−assert(not math.tointeger(- math.pi))
598+assert((not math.tointeger((- math.pi))))
599assert((math.floor(math.huge) == math.huge))
599assert((math.floor(math.huge) == math.huge))
600assert((math.ceil(math.huge) == math.huge))
600assert((math.ceil(math.huge) == math.huge))
601−assert(not math.tointeger(math.huge))
601+assert((not math.tointeger(math.huge)))
602−assert((math.floor(- math.huge) == - math.huge))
602+assert((math.floor((- math.huge)) == (- math.huge)))
603−assert((math.ceil(- math.huge) == - math.huge))
603+assert((math.ceil((- math.huge)) == (- math.huge)))
604−assert(not math.tointeger(- math.huge))
604+assert((not math.tointeger((- math.huge))))
605assert((math.tointeger("\u{33}\u{34}\u{2e}\u{30}") == 0x22))
605assert((math.tointeger("\u{33}\u{34}\u{2e}\u{30}") == 0x22))
606−assert(not math.tointeger("\u{33}\u{34}\u{2e}\u{33}"))
606+assert((not math.tointeger("\u{33}\u{34}\u{2e}\u{33}")))
607−assert(not math.tointeger({}))
607+assert((not math.tointeger({})))
608−assert(not math.tointeger((0x0 / 0x0)))
608+assert((not math.tointeger((0x0 / 0x0))))
609end
609end
610−for i = - 0x6, 0x6
610+for i = (- 0x6), 0x6
611do
611do
612−for j = - 0x6, 0x6
612+for j = (- 0x6), 0x6
613do
613do
614if (j ~= 0x0) then
614if (j ~= 0x0) then
615local mi = math.fmod(i,j)
615local mi = math.fmod(i,j)
@@ -636,18 +636,18 @@ assert((math.max(maxint,1e61) == 1e61))
636assert(eqT(math.max(minint,(minint + 0x1)),(minint + 0x1)))
636assert(eqT(math.max(minint,(minint + 0x1)),(minint + 0x1)))
637assert(eqT(math.min(0x3),0x3))
637assert(eqT(math.min(0x3),0x3))
638assert(eqT(math.min(0x3,0x5,0x9,0x1),0x1))
638assert(eqT(math.min(0x3,0x5,0x9,0x1),0x1))
639−assert((math.min(3.2,5.9,- 9.2,1.1) == - 9.2))
639+assert((math.min(3.2,5.9,(- 9.2),1.1) == (- 9.2)))
640assert((math.min(1.9,1.7,1.72) == 1.7))
640assert((math.min(1.9,1.7,1.72) == 1.7))
641−assert((math.min(- 1e61,minint) == - 1e61))
641+assert((math.min((- 1e61),minint) == (- 1e61)))
642assert(eqT(math.min(maxint,(maxint - 0x1)),(maxint - 0x1)))
642assert(eqT(math.min(maxint,(maxint - 0x1)),(maxint - 0x1)))
643assert(eqT(math.min((maxint - 0x2),maxint,(maxint - 0x1)),(maxint - 0x2)))
643assert(eqT(math.min((maxint - 0x2),maxint,(maxint - 0x1)),(maxint - 0x2)))
644end
644end
645local a,b = "\u{31}\u{30}","\u{32}\u{30}"
645local a,b = "\u{31}\u{30}","\u{32}\u{30}"
646−assert(((((a * b) == 0xc8) and ((a + b) == 0x1e)) and ((a - b) == - ((0xa and ((a / b) == 0.5)) and - (b == - 0x14)))))
646+assert(((((a * b) == 0xc8) and ((a + b) == 0x1e)) and ((a - b) == (- ((0xa and ((a / b) == 0.5)) and (- (b == (- 0x14))))))))
647assert(((a == "\u{31}\u{30}") and (b == "\u{32}\u{30}")))
647assert(((a == "\u{31}\u{30}") and (b == "\u{32}\u{30}")))
648do
648do
649print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{4e}\u{61}\u{4e}")
649print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{4e}\u{61}\u{4e}")
650−local mz <const> = - 0.0
650+local mz <const> = (- 0.0)
651local z <const> = 0.0
651local z <const> = 0.0
652assert((mz == z))
652assert((mz == z))
653assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
653assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
@@ -656,24 +656,24 @@ assert(((a[z] == 0x1) and (a[mz] == 0x1)))
656a[z]=0x2
656a[z]=0x2
657assert(((a[z] == 0x2) and (a[mz] == 0x2)))
657assert(((a[z] == 0x2) and (a[mz] == 0x2)))
658local inf = ((math.huge * 0x2) + 0x1)
658local inf = ((math.huge * 0x2) + 0x1)
659−local mz <const> = - (0x1 / inf)
659+local mz <const> = (- (0x1 / inf))
660local z <const> = (0x1 / inf)
660local z <const> = (0x1 / inf)
661assert((mz == z))
661assert((mz == z))
662assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
662assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
663local NaN <const> = (inf - inf)
663local NaN <const> = (inf - inf)
664assert((NaN ~= NaN))
664assert((NaN ~= NaN))
665−assert(not (NaN < NaN))
665+assert((not (NaN < NaN)))
666−assert(not (NaN <= NaN))
666+assert((not (NaN <= NaN)))
667−assert(not (NaN > NaN))
667+assert((not (NaN > NaN)))
668−assert(not (NaN >= NaN))
668+assert((not (NaN >= NaN)))
669−assert(not ((0x0 < NaN) and not (NaN < 0x0)))
669+assert((not ((0x0 < NaN) and (not (NaN < 0x0)))))
670local NaN1 <const> = (0x0 / 0x0)
670local NaN1 <const> = (0x0 / 0x0)
671−assert(((NaN ~= NaN1) and not ((NaN <= NaN1) and not (NaN1 <= NaN))))
671+assert(((NaN ~= NaN1) and (not ((NaN <= NaN1) and (not (NaN1 <= NaN))))))
672local a = {}
672local a = {}
673−assert(not pcall(rawset,a,NaN,0x1))
673+assert((not pcall(rawset,a,NaN,0x1)))
674assert((a[NaN] == undef))
674assert((a[NaN] == undef))
675a[0x1]=0x1
675a[0x1]=0x1
676−assert(not pcall(rawset,a,NaN,0x1))
676+assert((not pcall(rawset,a,NaN,0x1)))
677assert((a[NaN] == undef))
677assert((a[NaN] == undef))
678local a1,a2,a3,a4,a5 = 0x0,0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}",0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}"
678local a1,a2,a3,a4,a5 = 0x0,0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}",0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}"
679assert((((a1 == a2) and (a2 == a4)) and (a1 ~= a3)))
679assert((((a1 == a2) and (a2 == a4)) and (a1 ~= a3)))
@@ -689,7 +689,7 @@ do
689local h <const> = 0x7a7040a5
689local h <const> = 0x7a7040a5
690local l <const> = 0xa323c9d6
690local l <const> = 0xa323c9d6
691math.randomseed(0x3ef)
691math.randomseed(0x3ef)
692−local res = (((h << 0x20) | l) & ~ (~ (0x0 << intbits)))
692+local res = (((h << 0x20) | l) & (~ (~ (0x0 << intbits))))
693assert((random(0x0) == res))
693assert((random(0x0) == res))
694math.randomseed(0x3ef,0x0)
694math.randomseed(0x3ef,0x0)
695local res
695local res
@@ -699,7 +699,7 @@ else
699res=(((h % (0x2 ^ 0x20)) * (0x2 ^ (floatbits - 0x20))) + ((l >> (0x40 - floatbits)) % (0x2 ^ 0x20)))
699res=(((h % (0x2 ^ 0x20)) * (0x2 ^ (floatbits - 0x20))) + ((l >> (0x40 - floatbits)) % (0x2 ^ 0x20)))
700end
700end
701local rand = random()
701local rand = random()
702−assert(eq(rand,0.4782753376376966,(0x2 ^ - floatbits)))
702+assert(eq(rand,0.4782753376376966,(0x2 ^ (- floatbits))))
703assert(((rand * (0x2 ^ floatbits)) == res))
703assert(((rand * (0x2 ^ floatbits)) == res))
704end
704end
705do
705do
@@ -719,7 +719,7 @@ for i = 0x1, randbits
719do
719do
720counts[i]=0x0
720counts[i]=0x0
721end
721end
722−local up = - math.huge
722+local up = (- math.huge)
723local low = math.huge
723local low = math.huge
724local rounds = (0x64 * randbits)
724local rounds = (0x64 * randbits)
725local totalrounds = 0x0
725local totalrounds = 0x0
@@ -737,13 +737,13 @@ counts[(bit + 0x1)]=(counts[(bit + 0x1)] + 0x1)
737end
737end
738end
738end
739totalrounds=(totalrounds + rounds)
739totalrounds=(totalrounds + rounds)
740−if not (eq(up,0x1,1e-3) and eq(low,0x0,1e-3)) then
740+if (not (eq(up,0x1,1e-3) and eq(low,0x0,1e-3))) then
741goto doagain
741goto doagain
742end
742end
743local expected = ((totalrounds / randbits) / 0x2)
743local expected = ((totalrounds / randbits) / 0x2)
744for i = 0x1, randbits
744for i = 0x1, randbits
745do
745do
746−if not testnear(counts[i],expected,0.1) then
746+if (not testnear(counts[i],expected,0.1)) then
747goto doagain
747goto doagain
748end
748end
749end
749end
@@ -770,13 +770,13 @@ counts[(bit + 0x1)]=(counts[(bit + 0x1)] + ((t >> bit) & 0x1))
770end
770end
771totalrounds=(totalrounds + rounds)
771totalrounds=(totalrounds + rounds)
772local lim = (maxint >> 0xa)
772local lim = (maxint >> 0xa)
773−if not (((maxint - up) < lim) and ((low - minint) < lim)) then
773+if (not (((maxint - up) < lim) and ((low - minint) < lim))) then
774goto doagain
774goto doagain
775end
775end
776local expected = ((totalrounds / intbits) / 0x2)
776local expected = ((totalrounds / intbits) / 0x2)
777for i = 0x1, intbits
777for i = 0x1, intbits
778do
778do
779−if not testnear(counts[i],expected,0.1) then
779+if (not testnear(counts[i],expected,0.1)) then
780goto doagain
780goto doagain
781end
781end
782end
782end
@@ -795,7 +795,7 @@ end
795totalrep=(totalrep + rep)
795totalrep=(totalrep + rep)
796for i = 0x1, 0x6
796for i = 0x1, 0x6
797do
797do
798−if not testnear(count[i],totalrep,0.05) then
798+if (not testnear(count[i],totalrep,0.05)) then
799goto doagain
799goto doagain
800end
800end
801end
801end
@@ -809,7 +809,7 @@ local count = 0x0
809while true do
809while true do
810local t = random(x1,x2)
810local t = random(x1,x2)
811assert(((x1 <= t) and (t <= x2)))
811assert(((x1 <= t) and (t <= x2)))
812−if not mark[t] then
812+if (not mark[t]) then
813mark[t]=true
813mark[t]=true
814count=(count + 0x1)
814count=(count + 0x1)
815if (count == ((x2 - x1) + 0x1)) then
815if (count == ((x2 - x1) + 0x1)) then
@@ -819,15 +819,15 @@ end
819end
819end
820::ok::
820::ok::
821end
821end
822−aux(- 0xa,0x0)
822+aux((- 0xa),0x0)
823aux(0x1,0x6)
823aux(0x1,0x6)
824aux(0x1,0x2)
824aux(0x1,0x2)
825aux(0x1,0xd)
825aux(0x1,0xd)
826aux(0x1,0x1f)
826aux(0x1,0x1f)
827aux(0x1,0x20)
827aux(0x1,0x20)
828aux(0x1,0x21)
828aux(0x1,0x21)
829−aux(- 0xa,0xa)
829+aux((- 0xa),0xa)
830−aux(- 0xa,- 0xa)
830+aux((- 0xa),(- 0xa))
831aux(minint,minint)
831aux(minint,minint)
832aux(maxint,maxint)
832aux(maxint,maxint)
833aux(minint,(minint + 0x9))
833aux(minint,(minint + 0x9))
@@ -846,7 +846,7 @@ local count = 0x0
846for _ = 0x1, n
846for _ = 0x1, n
847do
847do
848local t = random(p1,p2)
848local t = random(p1,p2)
849−if not mark[t] then
849+if (not mark[t]) then
850assert(((p1 <= t) and (t <= p2)))
850assert(((p1 <= t) and (t <= p2)))
851max=math.max(max,t)
851max=math.max(max,t)
852min=math.min(min,t)
852min=math.min(min,t)
@@ -854,26 +854,26 @@ mark[t]=true
854count=(count + 0x1)
854count=(count + 0x1)
855end
855end
856end
856end
857−if not (count >= (n * 0.8)) then
857+if (not (count >= (n * 0.8))) then
858goto doagain
858goto doagain
859end
859end
860local diff = ((p2 - p1) >> 0x4)
860local diff = ((p2 - p1) >> 0x4)
861−if not ((min < (p1 + diff)) and (max > (p2 - diff))) then
861+if (not ((min < (p1 + diff)) and (max > (p2 - diff)))) then
862goto doagain
862goto doagain
863end
863end
864end
864end
865aux(0x0,maxint)
865aux(0x0,maxint)
866aux(0x1,maxint)
866aux(0x1,maxint)
867aux(0x3,(maxint // 0x3))
867aux(0x3,(maxint // 0x3))
868−aux(minint,- 0x1)
868+aux(minint,(- 0x1))
869aux((minint // 0x2),(maxint // 0x2))
869aux((minint // 0x2),(maxint // 0x2))
870aux(minint,maxint)
870aux(minint,maxint)
871aux((minint + 0x1),maxint)
871aux((minint + 0x1),maxint)
872aux(minint,(maxint - 0x1))
872aux(minint,(maxint - 0x1))
873aux(0x0,(0x1 << (intbits - 0x5)))
873aux(0x0,(0x1 << (intbits - 0x5)))
874end
874end
875−assert(not pcall(random,0x1,0x2,0x3))
875+assert((not pcall(random,0x1,0x2,0x3)))
876−assert(not pcall(random,(minint + 0x1),minint))
876+assert((not pcall(random,(minint + 0x1),minint)))
877−assert(not pcall(random,maxint,(maxint - 0x1)))
877+assert((not pcall(random,maxint,(maxint - 0x1))))
878−assert(not pcall(random,maxint,minint))
878+assert((not pcall(random,maxint,minint)))
879print("\u{4f}\u{4b}")
879print("\u{4f}\u{4b}")
desk/res/lua/cycled/nextvar.lua+97−97
@@ -2,11 +2,11 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\
2local function checkerror
2local function checkerror
3(msg,f, ...)
3(msg,f, ...)
4local s,err = pcall(f,...)
4local s,err = pcall(f,...)
5−assert(not (s and string.find(err,msg)))
5+assert((not (s and string.find(err,msg))))
6end
6end
7local function check
7local function check
8(t,na,nh)
8(t,na,nh)
9−if not T then
9+if (not T) then
10return
10return
11end
11end
12local a,h = T.querytab(t)
12local a,h = T.querytab(t)
@@ -27,7 +27,7 @@ end
27for i = 0x1, 0x64
27for i = 0x1, 0x64
28do
28do
29a[i]=true
29a[i]=true
30−assert(# (a == i))
30+assert((# (a == i)))
31end
31end
32do
32do
33local a = {}
33local a = {}
@@ -72,7 +72,7 @@ local i = 0x0
72for k,v in ipairs({true,false,true,false})
72for k,v in ipairs({true,false,true,false})
73do
73do
74i=(i + 0x1)
74i=(i + 0x1)
75−x=not x
75+x=(not x)
76assert((x == v))
76assert((x == v))
77end
77end
78assert((i == 0x4))
78assert((i == 0x4))
@@ -84,7 +84,7 @@ assert(((k == math.mininteger) and (v == 0xa)))
84k,v=f({[math.mininteger] = 0xa},k)
84k,v=f({[math.mininteger] = 0xa},k)
85assert((k == nil))
85assert((k == nil))
86end
86end
87−if not T then
87+if (not T) then
88(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
88(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
89else
89else
90local function mp2
90local function mp2
@@ -131,23 +131,23 @@ local t = f()
131T.alloccount()
131T.alloccount()
132;
132;
133collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
133collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
134−assert(# (t == sa))
134+assert((# (t == sa)))
135check(t,sa,mp2(sh))
135check(t,sa,mp2(sh))
136end
136end
137end
137end
138local a = {}
138local a = {}
139−for i = 0x1, sizes[# sizes]
139+for i = 0x1, sizes[(# sizes)]
140do
140do
141a[i]=i
141a[i]=i
142end
142end
143for k in ipairs(sizes)
143for k in ipairs(sizes)
144do
144do
145local t = {table.unpack(a,0x1,k)}
145local t = {table.unpack(a,0x1,k)}
146−assert(# (t == k))
146+assert((# (t == k)))
147check(t,k,0x0)
147check(t,k,0x0)
148t={0x1,0x2,0x3,table.unpack(a,0x1,k)}
148t={0x1,0x2,0x3,table.unpack(a,0x1,k)}
149check(t,(k + 0x3),0x0)
149check(t,(k + 0x3),0x0)
150−assert(# (t == (k + 0x3)))
150+assert((# (t == (k + 0x3))))
151end
151end
152local lim = 0x82
152local lim = 0x82
153local a = {}
153local a = {}
@@ -175,14 +175,14 @@ a={}
175for i = 0x1, lim
175for i = 0x1, lim
176do
176do
177a[i]=0x1
177a[i]=0x1
178−assert(# (a == i))
178+assert((# (a == i)))
179check(a,mp2(i),0x0)
179check(a,mp2(i),0x0)
180end
180end
181a={}
181a={}
182for i = 0x1, lim
182for i = 0x1, lim
183do
183do
184a[("\u{61}" .. i)]=0x1
184a[("\u{61}" .. i)]=0x1
185−assert(# (a == 0x0))
185+assert((# (a == 0x0)))
186check(a,0x0,mp2(i))
186check(a,0x0,mp2(i))
187end
187end
188a={}
188a={}
@@ -228,7 +228,7 @@ end
228for i = 0x1, lim
228for i = 0x1, lim
229do
229do
230local a = {}
230local a = {}
231−for i = i, 0x1, - 0x1
231+for i = i, 0x1, (- 0x1)
232do
232do
233a[i]=i
233a[i]=i
234end
234end
@@ -267,18 +267,18 @@ a[0x20]=true
267a[0x30]=true
267a[0x30]=true
268;
268;
269a[0x33]=true
269a[0x33]=true
270−assert(# (a == 0x30))
270+assert((# (a == 0x30)))
271assert((select(0x4,T.querytab(a)) == 0x30))
271assert((select(0x4,T.querytab(a)) == 0x30))
272a[0x32]=true
272a[0x32]=true
273assert((select(0x4,T.querytab(a)) == 0x32))
273assert((select(0x4,T.querytab(a)) == 0x32))
274−assert(# (a == 0x33))
274+assert((# (a == 0x33)))
275−end
275+end
276−assert(# ({} == 0x0))
276+assert((# ({} == 0x0)))
277−assert(# ({nil} == 0x0))
277+assert((# ({nil} == 0x0)))
278−assert(# ({nil,nil} == 0x0))
278+assert((# ({nil,nil} == 0x0)))
279−assert(# ({nil,nil,nil} == 0x0))
279+assert((# ({nil,nil,nil} == 0x0)))
280−assert(# ({nil,nil,nil,nil} == 0x0))
280+assert((# ({nil,nil,nil,nil} == 0x0)))
281−assert(# ({0x1,0x2,0x3,nil,nil} == 0x3))
281+assert((# ({0x1,0x2,0x3,nil,nil} == 0x3)))
282print("\u{2b}")
282print("\u{2b}")
283local nofind = {}
283local nofind = {}
284a,b,c=0x1,0x2,0x3
284a,b,c=0x1,0x2,0x3
@@ -289,7 +289,7 @@ local function find
289local n,v
289local n,v
290while 0x1 do
290while 0x1 do
291n,v=next(_G,n)
291n,v=next(_G,n)
292−if not n then
292+if (not n) then
293return nofind
293return nofind
294end
294end
295assert((_G[n] ~= undef))
295assert((_G[n] ~= undef))
@@ -312,7 +312,7 @@ assert(((print == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")) and (print == find1("\
312assert((_G["\u{70}\u{72}\u{69}\u{6e}\u{74}"] == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")))
312assert((_G["\u{70}\u{72}\u{69}\u{6e}\u{74}"] == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")))
313assert((assert == find1("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}")))
313assert((assert == find1("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}")))
314assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
314assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
315−assert(not find1("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"))
315+assert((not find1("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
316_G[("\u{72}\u{65}\u{74}" .. "\u{75}\u{72}\u{6e}")]=undef
316_G[("\u{72}\u{65}\u{74}" .. "\u{75}\u{72}\u{6e}")]=undef
317assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
317assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
318_G["\u{78}\u{78}\u{78}"]=0x1
318_G["\u{78}\u{78}\u{78}"]=0x1
@@ -344,7 +344,7 @@ a[n]=v
344end
344end
345for n,v in pairs(a)
345for n,v in pairs(a)
346do
346do
347−if not ((package.loaded[n] and (type(v) ~= "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")) and not string.find(n,"\u{5e}\u{5b}\u{25}\u{75}\u{5f}\u{5d}")) then
347+if (not ((package.loaded[n] and (type(v) ~= "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")) and (not string.find(n,"\u{5e}\u{5b}\u{25}\u{75}\u{5f}\u{5d}")))) then
348_G[n]=undef
348_G[n]=undef
349end
349end
350collectgarbage()
350collectgarbage()
@@ -376,8 +376,8 @@ checknext({0x1,0x2,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
376checknext({0x1,0x2,0x3,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
376checknext({0x1,0x2,0x3,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
377checknext({0x1,0x2,0x3,0x4,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
377checknext({0x1,0x2,0x3,0x4,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
378checknext({0x1,0x2,0x3,0x4,0x5,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
378checknext({0x1,0x2,0x3,0x4,0x5,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
379−assert(# ({} == 0x0))
379+assert((# ({} == 0x0)))
380−assert(# ({[- 0x1] = 0x2} == 0x0))
380+assert((# ({[(- 0x1)] = 0x2} == 0x0)))
381for i = 0x0, 0x28
381for i = 0x0, 0x28
382do
382do
383local a = {}
383local a = {}
@@ -385,7 +385,7 @@ for j = 0x1, i
385do
385do
386a[j]=j
386a[j]=j
387end
387end
388−assert(# (a == i))
388+assert((# (a == i)))
389end
389end
390function table.maxn(t)
390function table.maxn(t)
391local max = 0x0
391local max = 0x0
@@ -406,7 +406,7 @@ for i = 0x0, 0x32
406do
406do
407a[(0x2 ^ i)]=true
407a[(0x2 ^ i)]=true
408end
408end
409−assert(a[# a])
409+assert(a[(# a)])
410print("\u{2b}")
410print("\u{2b}")
411do
411do
412local a = {[0x1] = 0x1,[1.1] = 0x2,["\u{78}"] = 0x3,[string.rep("\u{78}",0x3e8)] = 0x4,[print] = 0x5,[checkerror] = 0x6,[coroutine.running()] = 0x7,[true] = 0x8,[io.stdin] = 0x9,[{}] = 0xa}
412local a = {[0x1] = 0x1,[1.1] = 0x2,["\u{78}"] = 0x3,[string.rep("\u{78}",0x3e8)] = 0x4,[print] = 0x5,[checkerror] = 0x6,[coroutine.running()] = 0x7,[true] = 0x8,[io.stdin] = 0x9,[{}] = 0xa}
@@ -467,54 +467,54 @@ assert(((count == 0x0) and (next(t) == nil)))
467end
467end
468local function test
468local function test
469(a)
469(a)
470−assert(not pcall(table.insert,a,0x2,0x14))
470+assert((not pcall(table.insert,a,0x2,0x14)))
471;
471;
472table.insert(a,0xa)
472table.insert(a,0xa)
473;
473;
474table.insert(a,0x2,0x14)
474table.insert(a,0x2,0x14)
475;
475;
476−table.insert(a,0x1,- 0x1)
476+table.insert(a,0x1,(- 0x1))
477;
477;
478table.insert(a,0x28)
478table.insert(a,0x28)
479;
479;
480−table.insert(a,# (a + 0x1),0x32)
480+table.insert(a,(# (a + 0x1)),0x32)
481−table.insert(a,0x2,- 0x2)
481+table.insert(a,0x2,(- 0x2))
482assert((a[0x2] ~= undef))
482assert((a[0x2] ~= undef))
483assert((a["\u{32}"] == undef))
483assert((a["\u{32}"] == undef))
484−assert(not pcall(table.insert,a,0x0,0x14))
484+assert((not pcall(table.insert,a,0x0,0x14)))
485;
485;
486−assert(not pcall(table.insert,a,# (a + 0x2),0x14))
486+assert((not pcall(table.insert,a,(# (a + 0x2)),0x14)))
487;
487;
488−assert((table.remove(a,0x1) == - 0x1))
488+assert((table.remove(a,0x1) == (- 0x1)))
489−assert((table.remove(a,0x1) == - 0x2))
489+assert((table.remove(a,0x1) == (- 0x2)))
490assert((table.remove(a,0x1) == 0xa))
490assert((table.remove(a,0x1) == 0xa))
491assert((table.remove(a,0x1) == 0x14))
491assert((table.remove(a,0x1) == 0x14))
492assert((table.remove(a,0x1) == 0x28))
492assert((table.remove(a,0x1) == 0x28))
493assert((table.remove(a,0x1) == 0x32))
493assert((table.remove(a,0x1) == 0x32))
494assert((table.remove(a,0x1) == nil))
494assert((table.remove(a,0x1) == nil))
495assert((table.remove(a) == nil))
495assert((table.remove(a) == nil))
496−assert((table.remove(a,# a) == nil))
496+assert((table.remove(a,(# a)) == nil))
497end
497end
498−a={["\u{6e}"] = 0x0,[- 0x7] = "\u{62}\u{61}\u{6e}"}
498+a={["\u{6e}"] = 0x0,[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
499test(a)
499test(a)
500−assert(((a.n == 0x0) and (a[- 0x7] == "\u{62}\u{61}\u{6e}")))
500+assert(((a.n == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))
501−a={[- 0x7] = "\u{62}\u{61}\u{6e}"}
501+a={[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
502;
502;
503test(a)
503test(a)
504−assert(((a.n == nil) and # ((a == 0x0) and (a[- 0x7] == "\u{62}\u{61}\u{6e}"))))
504+assert(((a.n == nil) and (# ((a == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))))
505−a={[- 0x1] = "\u{62}\u{61}\u{6e}"}
505+a={[(- 0x1)] = "\u{62}\u{61}\u{6e}"}
506test(a)
506test(a)
507−assert(# (((a == 0x0) and (table.remove(a) == nil)) and (a[- 0x1] == "\u{62}\u{61}\u{6e}")))
507+assert((# (((a == 0x0) and (table.remove(a) == nil)) and (a[(- 0x1)] == "\u{62}\u{61}\u{6e}"))))
508a={[0x0] = "\u{62}\u{61}\u{6e}"}
508a={[0x0] = "\u{62}\u{61}\u{6e}"}
509−assert(# (((a == 0x0) and (table.remove(a) == "\u{62}\u{61}\u{6e}")) and (a[0x0] == undef)))
509+assert((# (((a == 0x0) and (table.remove(a) == "\u{62}\u{61}\u{6e}")) and (a[0x0] == undef))))
510table.insert(a,0x1,0xa)
510table.insert(a,0x1,0xa)
511;
511;
512table.insert(a,0x1,0x14)
512table.insert(a,0x1,0x14)
513;
513;
514−table.insert(a,0x1,- 0x1)
514+table.insert(a,0x1,(- 0x1))
515assert((table.remove(a) == 0xa))
515assert((table.remove(a) == 0xa))
516assert((table.remove(a) == 0x14))
516assert((table.remove(a) == 0x14))
517−assert((table.remove(a) == - 0x1))
517+assert((table.remove(a) == (- 0x1)))
518assert((table.remove(a) == nil))
518assert((table.remove(a) == nil))
519a={"\u{63}","\u{64}"}
519a={"\u{63}","\u{64}"}
520table.insert(a,0x3,"\u{61}")
520table.insert(a,0x3,"\u{61}")
@@ -524,15 +524,15 @@ assert((table.remove(a,0x1) == "\u{64}"))
524assert((table.remove(a,0x1) == "\u{61}"))
524assert((table.remove(a,0x1) == "\u{61}"))
525assert((table.remove(a,0x1) == "\u{62}"))
525assert((table.remove(a,0x1) == "\u{62}"))
526assert((table.remove(a,0x1) == nil))
526assert((table.remove(a,0x1) == nil))
527−assert(# ((a == 0x0) and (a.n == nil)))
527+assert((# ((a == 0x0) and (a.n == nil))))
528a={0xa,0x14,0x1e,0x28}
528a={0xa,0x14,0x1e,0x28}
529−assert((table.remove(a,# (a + 0x1)) == nil))
529+assert((table.remove(a,(# (a + 0x1))) == nil))
530−assert(not pcall(table.remove,a,0x0))
530+assert((not pcall(table.remove,a,0x0)))
531−assert((a[# a] == 0x28))
531+assert((a[(# a)] == 0x28))
532−assert((table.remove(a,# a) == 0x28))
532+assert((table.remove(a,(# a)) == 0x28))
533−assert((a[# a] == 0x1e))
533+assert((a[(# a)] == 0x1e))
534assert((table.remove(a,0x2) == 0x14))
534assert((table.remove(a,0x2) == 0x14))
535−assert(((a[# a] == 0x1e) and # (a == 0x2)))
535+assert(((a[(# a)] == 0x1e) and (# (a == 0x2))))
536do
536do
537local function test
537local function test
538(proxy,t)
538(proxy,t)
@@ -540,7 +540,7 @@ for i = 0x1, 0xa
540do
540do
541table.insert(proxy,0x1,i)
541table.insert(proxy,0x1,i)
542end
542end
543−assert(# ((proxy == 0xa) and # ((t == 0xa) and (proxy[0x1] ~= undef))))
543+assert((# ((proxy == 0xa) and (# ((t == 0xa) and (proxy[0x1] ~= undef))))))
544for i = 0x1, 0xa
544for i = 0x1, 0xa
545do
545do
546assert((t[i] == (0xb - i)))
546assert((t[i] == (0xb - i)))
@@ -555,13 +555,13 @@ for i = 0x1, 0x8
555do
555do
556assert((table.remove(proxy,0x1) == i))
556assert((table.remove(proxy,0x1) == i))
557end
557end
558−assert(# ((proxy == 0x2) and # (t == 0x2)))
558+assert((# ((proxy == 0x2) and (# (t == 0x2)))))
559local a,b,c = table.unpack(proxy)
559local a,b,c = table.unpack(proxy)
560assert((((a == 0x9) and (b == 0xa)) and (c == nil)))
560assert((((a == 0x9) and (b == 0xa)) and (c == nil)))
561end
561end
562local t = {}
562local t = {}
563local proxy = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
563local proxy = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
564−return # t
564+return (# t)
565end,["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t})
565end,["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t})
566test(proxy,t)
566test(proxy,t)
567local count = 0x0
567local count = 0x0
@@ -587,7 +587,7 @@ table.insert(t,0x14)
587local k,v = next(t)
587local k,v = next(t)
588assert(((k == math.mininteger) and (v == 0x14)))
588assert(((k == math.mininteger) and (v == 0x14)))
589end
589end
590−if not T then
590+if (not T) then
591(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
591(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
592else
592else
593local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
593local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
@@ -606,13 +606,13 @@ mt.__newindex=tab
606checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
606checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
607checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
607checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
608mt.__len=function ()
608mt.__len=function ()
609−return # tab
609+return (# tab)
610end
610end
611table.insert(u,0x28)
611table.insert(u,0x28)
612−assert(# ((u == 0x4) and # (((tab == 0x4) and (u[0x4] == 0x28)) and (tab[0x4] == 0x28))))
612+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x28)) and (tab[0x4] == 0x28))))))
613assert((table.remove(u) == 0x28))
613assert((table.remove(u) == 0x28))
614table.insert(u,0x1,0x32)
614table.insert(u,0x1,0x32)
615−assert(# ((u == 0x4) and # (((tab == 0x4) and (u[0x4] == 0x1e)) and (tab[0x1] == 0x32))))
615+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x1e)) and (tab[0x1] == 0x32))))))
616mt.__newindex=nil
616mt.__newindex=nil
617mt.__len=nil
617mt.__len=nil
618local tab2 = {}
618local tab2 = {}
@@ -621,7 +621,7 @@ debug.setmetatable(u2,{["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\
621tab2[k]=v
621tab2[k]=v
622end})
622end})
623table.move(u,0x1,0x4,0x1,u2)
623table.move(u,0x1,0x4,0x1,u2)
624−assert(# (((tab2 == 0x4) and (tab2[0x1] == tab[0x1])) and (tab2[0x4] == tab[0x4])))
624+assert((# (((tab2 == 0x4) and (tab2[0x1] == tab[0x1])) and (tab2[0x4] == tab[0x4]))))
625end
625end
626print("\u{2b}")
626print("\u{2b}")
627a={}
627a={}
@@ -642,7 +642,7 @@ for i = 0x1, 0x0
642do
642do
643error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
643error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
644end
644end
645−for i = 0x0, 0x1, - 0x1
645+for i = 0x0, 0x1, (- 0x1)
646do
646do
647error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
647error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
648end
648end
@@ -650,7 +650,7 @@ a=nil
650;
650;
651for i = 0x1, 0x1
651for i = 0x1, 0x1
652do
652do
653−assert(not a)
653+assert((not a))
654;
654;
655a=0x1
655a=0x1
656end
656end
@@ -658,9 +658,9 @@ end
658assert(a)
658assert(a)
659a=nil
659a=nil
660;
660;
661−for i = 0x1, 0x1, - 0x1
661+for i = 0x1, 0x1, (- 0x1)
662do
662do
663−assert(not a)
663+assert((not a))
664;
664;
665a=0x1
665a=0x1
666end
666end
@@ -679,7 +679,7 @@ end
679assert((a == 0x1))
679assert((a == 0x1))
680a=0x0
680a=0x0
681;
681;
682−for i = 0x2710, 1e4, - 0x1
682+for i = 0x2710, 1e4, (- 0x1)
683do
683do
684a=(a + 0x1)
684a=(a + 0x1)
685end
685end
@@ -695,7 +695,7 @@ end
695assert((a == 0x0))
695assert((a == 0x0))
696a=0x0
696a=0x0
697;
697;
698−for i = 0x270f, 1e4, - 0x1
698+for i = 0x270f, 1e4, (- 0x1)
699do
699do
700a=(a + 0x1)
700a=(a + 0x1)
701end
701end
@@ -703,7 +703,7 @@ end
703assert((a == 0x0))
703assert((a == 0x0))
704a=0x0
704a=0x0
705;
705;
706−for i = 0x1, 0.99999, - 0x1
706+for i = 0x1, 0.99999, (- 0x1)
707do
707do
708a=(a + 0x1)
708a=(a + 0x1)
709end
709end
@@ -727,7 +727,7 @@ end
727assert((a == 0x1))
727assert((a == 0x1))
728a=0x0
728a=0x0
729;
729;
730−for i = - 1.5, - 1.5, 0x1
730+for i = (- 1.5), (- 1.5), 0x1
731do
731do
732a=(a + 0x1)
732a=(a + 0x1)
733end
733end
@@ -735,7 +735,7 @@ end
735assert((a == 0x1))
735assert((a == 0x1))
736a=0x0
736a=0x0
737;
737;
738−for i = 1e6, 1e6, - 0x1
738+for i = 1e6, 1e6, (- 0x1)
739do
739do
740a=(a + 0x1)
740a=(a + 0x1)
741end
741end
@@ -751,7 +751,7 @@ end
751assert((a == 0x0))
751assert((a == 0x0))
752a=0x0
752a=0x0
753;
753;
754−for i = 0x1869f, 1e5, - 1.0
754+for i = 0x1869f, 1e5, (- 1.0)
755do
755do
756a=(a + 0x1)
756a=(a + 0x1)
757end
757end
@@ -759,7 +759,7 @@ end
759assert((a == 0x0))
759assert((a == 0x0))
760a=0x0
760a=0x0
761;
761;
762−for i = 1.0, 0.99999, - 0x1
762+for i = 1.0, 0.99999, (- 0x1)
763do
763do
764a=(a + 0x1)
764a=(a + 0x1)
765end
765end
@@ -780,7 +780,7 @@ end
780assert((a == 0xa))
780assert((a == 0xa))
781a=0x0
781a=0x0
782;
782;
783−for i = 10.0, 0x1, - 0x1
783+for i = 10.0, 0x1, (- 0x1)
784do
784do
785a=(a + 0x1)
785a=(a + 0x1)
786;
786;
@@ -813,7 +813,7 @@ end
813assert((c == 0xa))
813assert((c == 0xa))
814c=0x0
814c=0x0
815;
815;
816−for i = - 0x1, - 0xa, - 1.0
816+for i = (- 0x1), (- 0xa), (- 1.0)
817do
817do
818checkfloat(i)
818checkfloat(i)
819end
819end
@@ -826,7 +826,7 @@ end
826local m = math.maxinteger
826local m = math.maxinteger
827c=0x0
827c=0x0
828;
828;
829−for i = m, (m - 0xa), - 0x1
829+for i = m, (m - 0xa), (- 0x1)
830do
830do
831checkint(i)
831checkint(i)
832end
832end
@@ -840,7 +840,7 @@ end
840assert((c == 0xa))
840assert((c == 0xa))
841c=0x0
841c=0x0
842;
842;
843−for i = 0xa, 1e-3, - 0x1
843+for i = 0xa, 1e-3, (- 0x1)
844do
844do
845checkint(i)
845checkint(i)
846end
846end
@@ -854,21 +854,21 @@ end
854assert((c == 0xa))
854assert((c == 0xa))
855c=0x0
855c=0x0
856;
856;
857−for i = 0x9, "\u{33}\u{2e}\u{34}", - 0x1
857+for i = 0x9, "\u{33}\u{2e}\u{34}", (- 0x1)
858do
858do
859checkint(i)
859checkint(i)
860end
860end
861assert((c == 0x6))
861assert((c == 0x6))
862c=0x0
862c=0x0
863;
863;
864−for i = 0x0, "\u{20}\u{2d}\u{33}\u{2e}\u{34}\u{20}\u{20}", - 0x1
864+for i = 0x0, "\u{20}\u{2d}\u{33}\u{2e}\u{34}\u{20}\u{20}", (- 0x1)
865do
865do
866checkint(i)
866checkint(i)
867end
867end
868assert((c == 0x4))
868assert((c == 0x4))
869c=0x0
869c=0x0
870;
870;
871−for i = 0x64, "\u{39}\u{36}\u{2e}\u{33}", - 0x2
871+for i = 0x64, "\u{39}\u{36}\u{2e}\u{33}", (- 0x2)
872do
872do
873checkint(i)
873checkint(i)
874end
874end
@@ -886,20 +886,20 @@ end
886assert((c == 0xa))
886assert((c == 0xa))
887c=0x0
887c=0x0
888;
888;
889−for i = - 0x1, - math.huge, - 0x1
889+for i = (- 0x1), (- math.huge), (- 0x1)
890do
890do
891−if (i < - 0xa) then
891+if (i < (- 0xa)) then
892break
892break
893end
893end
894;
894;
895checkint(i)
895checkint(i)
896end
896end
897assert((c == 0xa))
897assert((c == 0xa))
898−for i = math.mininteger, - 1e101
898+for i = math.mininteger, (- 1e101)
899do
899do
900assert(false)
900assert(false)
901end
901end
902−for i = math.maxinteger, 1e101, - 0x1
902+for i = math.maxinteger, 1e101, (- 0x1)
903do
903do
904assert(false)
904assert(false)
905end
905end
@@ -913,19 +913,19 @@ do
913c=(c + 0x1)
913c=(c + 0x1)
914assert((i == t[c]))
914assert((i == t[c]))
915end
915end
916−assert((c == # t))
916+assert((c == (# t)))
917end
917end
918local maxi = math.maxinteger
918local maxi = math.maxinteger
919local mini = math.mininteger
919local mini = math.mininteger
920−checkfor(mini,maxi,maxi,{mini,- 0x1,(maxi - 0x1)})
920+checkfor(mini,maxi,maxi,{mini,(- 0x1),(maxi - 0x1)})
921−checkfor(mini,math.huge,maxi,{mini,- 0x1,(maxi - 0x1)})
921+checkfor(mini,math.huge,maxi,{mini,(- 0x1),(maxi - 0x1)})
922−checkfor(maxi,mini,mini,{maxi,- 0x1})
922+checkfor(maxi,mini,mini,{maxi,(- 0x1)})
923−checkfor(maxi,mini,- maxi,{maxi,0x0,- maxi})
923+checkfor(maxi,mini,(- maxi),{maxi,0x0,(- maxi)})
924−checkfor(maxi,- math.huge,mini,{maxi,- 0x1})
924+checkfor(maxi,(- math.huge),mini,{maxi,(- 0x1)})
925checkfor(maxi,mini,0x1,{})
925checkfor(maxi,mini,0x1,{})
926−checkfor(mini,maxi,- 0x1,{})
926+checkfor(mini,maxi,(- 0x1),{})
927checkfor((maxi - 0x6),maxi,0x3,{(maxi - 0x6),(maxi - 0x3),maxi})
927checkfor((maxi - 0x6),maxi,0x3,{(maxi - 0x6),(maxi - 0x3),maxi})
928−checkfor((mini + 0x4),mini,- 0x2,{(mini + 0x4),(mini + 0x2),mini})
928+checkfor((mini + 0x4),mini,(- 0x2),{(mini + 0x4),(mini + 0x2),mini})
929local step = (maxi // 0xa)
929local step = (maxi // 0xa)
930local c = mini
930local c = mini
931for i = mini, maxi, step
931for i = mini, maxi, step
@@ -934,7 +934,7 @@ assert((i == c))
934c=(c + step)
934c=(c + step)
935end
935end
936c=maxi
936c=maxi
937−for i = maxi, mini, - step
937+for i = maxi, mini, (- step)
938do
938do
939assert((i == c))
939assert((i == c))
940c=(c - step)
940c=(c - step)
@@ -951,13 +951,13 @@ do
951end
951end
952end)
952end)
953checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
953checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
954−for i = 0x1, - 0xa, 0x0
954+for i = 0x1, (- 0xa), 0x0
955do
955do
956
956
957end
957end
958end)
958end)
959checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
959checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
960−for i = 1.0, - 0xa, 0.0
960+for i = 1.0, (- 0xa), 0.0
961do
961do
962
962
963end
963end
@@ -1039,17 +1039,17 @@ return (i - inc),t[(i - inc)]
1039else
1039else
1040return nil
1040return nil
1041end
1041end
1042−end,t,# (t + 0x1)
1042+end,t,(# (t + 0x1))
1043end})
1043end})
1044local res = {}
1044local res = {}
1045local co = coroutine.wrap(function ()
1045local co = coroutine.wrap(function ()
1046for i,p in pairs(t)
1046for i,p in pairs(t)
1047do
1047do
1048−res[# (res + 0x1)]=p
1048+res[(# (res + 0x1))]=p
1049end
1049end
1050end)
1050end)
1051co()
1051co()
1052co(0x1)
1052co(0x1)
1053−assert(((((res[0x1] == 0x1e) and (res[0x2] == 0x14)) and (res[0x3] == 0xa)) and # (res == 0x3)))
1053+assert(((((res[0x1] == 0x1e) and (res[0x2] == 0x14)) and (res[0x3] == 0xa)) and (# (res == 0x3))))
1054end
1054end
1055print("\u{4f}\u{4b}")
1055print("\u{4f}\u{4b}")
desk/res/lua/cycled/pm.lua+24−24
@@ -2,7 +2,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{74}\u{74}\
2local function checkerror
2local function checkerror
3(msg,f, ...)
3(msg,f, ...)
4local s,err = pcall(f,...)
4local s,err = pcall(f,...)
5−assert(not (s and string.find(err,msg)))
5+assert((not (s and string.find(err,msg))))
6end
6end
7local function f
7local function f
8(s,p)
8(s,p)
@@ -28,16 +28,16 @@ assert(((a == 0x9) and (b == 0xb)))
28;
28;
29a,b=string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}")
29a,b=string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}")
30assert(((a == 0xb) and (b == 0xb)))
30assert(((a == 0xb) and (b == 0xb)))
31−assert(not string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}\u{0}"))
31+assert((not string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}\u{0}")))
32−assert(not string.find("","\u{0}"))
32+assert((not string.find("","\u{0}")))
33assert((string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{31}\u{32}") == 0x4))
33assert((string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{31}\u{32}") == 0x4))
34−assert(not string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{5e}\u{31}\u{32}"))
34+assert((not string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{5e}\u{31}\u{32}")))
35assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2a}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
35assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2a}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
36assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2a}\u{61}") == "\u{61}\u{61}\u{61}"))
36assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2a}\u{61}") == "\u{61}\u{61}\u{61}"))
37assert((string.match("\u{62}","\u{2e}\u{2a}\u{62}") == "\u{62}"))
37assert((string.match("\u{62}","\u{2e}\u{2a}\u{62}") == "\u{62}"))
38assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2b}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
38assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2b}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
39assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2b}\u{61}") == "\u{61}\u{61}\u{61}"))
39assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2b}\u{61}") == "\u{61}\u{61}\u{61}"))
40−assert(not string.match("\u{62}","\u{2e}\u{2b}\u{62}"))
40+assert((not string.match("\u{62}","\u{2e}\u{2b}\u{62}")))
41assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{3f}\u{62}") == "\u{61}\u{62}"))
41assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{3f}\u{62}") == "\u{61}\u{62}"))
42assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{3f}\u{61}") == "\u{61}\u{61}"))
42assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{3f}\u{61}") == "\u{61}\u{61}"))
43assert((string.match("\u{62}","\u{2e}\u{3f}\u{62}") == "\u{62}"))
43assert((string.match("\u{62}","\u{2e}\u{3f}\u{62}") == "\u{62}"))
@@ -62,17 +62,17 @@ assert((f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{61}"))
62assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{62}\u{61}"))
62assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{62}\u{61}"))
63assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2b}") == "\u{61}\u{61}\u{61}"))
63assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2b}") == "\u{61}\u{61}\u{61}"))
64assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2b}\u{24}") == "\u{61}\u{61}\u{61}"))
64assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2b}\u{24}") == "\u{61}\u{61}\u{61}"))
65−assert(not f("\u{61}\u{61}\u{61}","\u{62}\u{2b}"))
65+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{2b}")))
66−assert(not f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2b}\u{61}"))
66+assert((not f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2b}\u{61}")))
67assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2b}\u{61}") == "\u{61}\u{62}\u{61}"))
67assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2b}\u{61}") == "\u{61}\u{62}\u{61}"))
68assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}") == "\u{61}"))
68assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}") == "\u{61}"))
69assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{25}\u{24}") == "\u{61}\u{24}"))
69assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{25}\u{24}") == "\u{61}\u{24}"))
70assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}\u{2e}") == "\u{61}\u{24}\u{61}"))
70assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}\u{2e}") == "\u{61}\u{24}\u{61}"))
71−assert(not f("\u{61}\u{24}\u{61}","\u{24}\u{24}"))
71+assert((not f("\u{61}\u{24}\u{61}","\u{24}\u{24}")))
72−assert(not f("\u{61}\u{24}\u{62}","\u{61}\u{24}"))
72+assert((not f("\u{61}\u{24}\u{62}","\u{61}\u{24}")))
73assert((f("\u{61}\u{24}\u{61}","\u{24}") == ""))
73assert((f("\u{61}\u{24}\u{61}","\u{24}") == ""))
74assert((f("","\u{62}\u{2a}") == ""))
74assert((f("","\u{62}\u{2a}") == ""))
75−assert(not f("\u{61}\u{61}\u{61}","\u{62}\u{62}\u{2a}"))
75+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{62}\u{2a}")))
76assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2d}") == ""))
76assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2d}") == ""))
77assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2d}\u{24}") == "\u{61}\u{61}\u{61}"))
77assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2d}\u{24}") == "\u{61}\u{61}\u{61}"))
78assert((f("\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}","\u{62}\u{2e}\u{2a}\u{62}") == "\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}"))
78assert((f("\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}","\u{62}\u{2e}\u{2a}\u{62}") == "\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}"))
@@ -99,12 +99,12 @@ end)
99p=string.gsub(p,"\u{5e}\u{28}\u{5e}\u{3f}\u{29}","\u{25}\u{31}\u{28}\u{29}",0x1)
99p=string.gsub(p,"\u{5e}\u{28}\u{5e}\u{3f}\u{29}","\u{25}\u{31}\u{28}\u{29}",0x1)
100p=string.gsub(p,"\u{28}\u{24}\u{3f}\u{29}\u{24}","\u{28}\u{29}\u{25}\u{31}",0x1)
100p=string.gsub(p,"\u{28}\u{24}\u{3f}\u{29}\u{24}","\u{28}\u{29}\u{25}\u{31}",0x1)
101local t = {string.match(s,p)}
101local t = {string.match(s,p)}
102−return string.sub(s,t[0x1],(t[# t] - 0x1))
102+return string.sub(s,t[0x1],(t[(# t)] - 0x1))
103end
103end
104assert((f1("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{78}\u{20}\u{31}\u{32}\u{33}\u{20}\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}","\u{28}\u{2e}\u{2e}\u{2a}\u{29}\u{20}\u{25}\u{31}") == "\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}"))
104assert((f1("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{78}\u{20}\u{31}\u{32}\u{33}\u{20}\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}","\u{28}\u{2e}\u{2e}\u{2a}\u{29}\u{20}\u{25}\u{31}") == "\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}"))
105assert((f1("\u{61}\u{78}\u{7a}\u{31}\u{32}\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}\u{34}","\u{28}\u{2e}\u{2b}\u{29}\u{3d}\u{28}\u{2e}\u{2a}\u{29}\u{3d}\u{25}\u{32}\u{20}\u{25}\u{31}") == "\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}"))
105assert((f1("\u{61}\u{78}\u{7a}\u{31}\u{32}\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}\u{34}","\u{28}\u{2e}\u{2b}\u{29}\u{3d}\u{28}\u{2e}\u{2a}\u{29}\u{3d}\u{25}\u{32}\u{20}\u{25}\u{31}") == "\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}"))
106assert((f1("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{3d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}") == "\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}"))
106assert((f1("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{3d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}") == "\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}"))
107−assert(not string.match("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{5b}\u{3d}\u{5d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}"))
107+assert((not string.match("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{5b}\u{3d}\u{5d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}")))
108local function range
108local function range
109(i,j)
109(i,j)
110if (i <= j) then
110if (i <= j) then
@@ -138,7 +138,7 @@ print("\u{2b}")
138assert((string.match("\u{61}\u{6c}\u{6f}\u{20}\u{78}\u{79}\u{7a}\u{4b}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{4b}") == "\u{78}\u{79}\u{7a}"))
138assert((string.match("\u{61}\u{6c}\u{6f}\u{20}\u{78}\u{79}\u{7a}\u{4b}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{4b}") == "\u{78}\u{79}\u{7a}"))
139assert((string.match("\u{32}\u{35}\u{34}\u{20}\u{4b}","\u{28}\u{25}\u{64}\u{2a}\u{29}\u{4b}") == ""))
139assert((string.match("\u{32}\u{35}\u{34}\u{20}\u{4b}","\u{28}\u{25}\u{64}\u{2a}\u{29}\u{4b}") == ""))
140assert((string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2a}\u{29}\u{24}") == ""))
140assert((string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2a}\u{29}\u{24}") == ""))
141−assert(not string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{24}"))
141+assert((not string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{24}")))
142assert((string.find("\u{28}\u{c3}\u{a1}\u{6c}\u{6f}\u{29}","\u{25}\u{28}\u{c3}\u{a1}") == 0x1))
142assert((string.find("\u{28}\u{c3}\u{a1}\u{6c}\u{6f}\u{29}","\u{25}\u{28}\u{c3}\u{a1}") == 0x1))
143local a,b,c,d,e = string.match("\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}",PU("\u{5e}\u{28}\u{28}\u{28}\u{2e}\u{29}\u{2e}\u{29}\u{2e}\u{20}\u{28}\u{25}\u{77}\u{2a}\u{29}\u{29}\u{24}"))
143local a,b,c,d,e = string.match("\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}",PU("\u{5e}\u{28}\u{28}\u{28}\u{2e}\u{29}\u{2e}\u{29}\u{2e}\u{20}\u{28}\u{25}\u{77}\u{2a}\u{29}\u{29}\u{24}"))
144assert((((((a == "\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") and (b == "\u{c3}\u{a2}\u{6c}")) and (c == "\u{c3}\u{a2}")) and (d == "\u{61}\u{6c}\u{6f}")) and (e == nil)))
144assert((((((a == "\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") and (b == "\u{c3}\u{a2}\u{6c}")) and (c == "\u{c3}\u{a2}")) and (d == "\u{61}\u{6c}\u{6f}")) and (e == nil)))
@@ -209,10 +209,10 @@ end)
209assert((((((s == r) and (t[0x1] == 0x1)) and (t[0x3] == 0x3)) and (t[0x7] == 0x4)) and (t[0xd] == 0x4)))
209assert((((((s == r) and (t[0x1] == 0x1)) and (t[0x3] == 0x3)) and (t[0x7] == 0x4)) and (t[0xd] == 0x4)))
210local function isbalanced
210local function isbalanced
211(s)
211(s)
212−return not string.find(string.gsub(s,"\u{25}\u{62}\u{28}\u{29}",""),"\u{5b}\u{28}\u{29}\u{5d}")
212+return (not string.find(string.gsub(s,"\u{25}\u{62}\u{28}\u{29}",""),"\u{5b}\u{28}\u{29}\u{5d}"))
213end
213end
214assert(isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{29}\u{28}\u{0}\u{29}\u{20}\u{37}\u{29}\u{20}\u{0}\u{0}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{29}\u{28}\u{63}\u{29}\u{28}\u{29}\u{20}\u{61}"))
214assert(isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{29}\u{28}\u{0}\u{29}\u{20}\u{37}\u{29}\u{20}\u{0}\u{0}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{29}\u{28}\u{63}\u{29}\u{28}\u{29}\u{20}\u{61}"))
215−assert(not isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{20}\u{37}\u{29}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{0}\u{20}\u{63}\u{29}\u{20}\u{61}"))
215+assert((not isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{20}\u{37}\u{29}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{0}\u{20}\u{63}\u{29}\u{20}\u{61}")))
216assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{27}\u{6f}\u{69}\u{27}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{62}\u{27}\u{27}","\u{22}") == "\u{61}\u{6c}\u{6f}\u{20}\u{22}\u{20}\u{61}\u{6c}\u{6f}"))
216assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{27}\u{6f}\u{69}\u{27}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{62}\u{27}\u{27}","\u{22}") == "\u{61}\u{6c}\u{6f}\u{20}\u{22}\u{20}\u{61}\u{6c}\u{6f}"))
217local t = {"\u{61}\u{70}\u{70}\u{6c}\u{65}","\u{6f}\u{72}\u{61}\u{6e}\u{67}\u{65}","\u{6c}\u{69}\u{6d}\u{65}",["\u{6e}"] = 0x0}
217local t = {"\u{61}\u{70}\u{70}\u{6c}\u{65}","\u{6f}\u{72}\u{61}\u{6e}\u{67}\u{65}","\u{6c}\u{69}\u{6d}\u{65}",["\u{6e}"] = 0x0}
218assert((string.gsub("\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}","\u{78}",function ()
218assert((string.gsub("\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}","\u{78}",function ()
@@ -239,14 +239,14 @@ checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u
239checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{30}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{30}\u{29}","\u{61}")
239checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{30}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{30}\u{29}","\u{61}")
240checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{31}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{31}\u{29}","\u{61}")
240checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{31}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{31}\u{29}","\u{61}")
241checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{75}\u{73}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{25}\u{25}\u{27}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}","\u{25}\u{78}")
241checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{75}\u{73}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{25}\u{25}\u{27}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}","\u{25}\u{78}")
242−if not _soft then
242+if (not _soft) then
243print("\u{62}\u{69}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
243print("\u{62}\u{69}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
244local a = string.rep("\u{61}",0x493e0)
244local a = string.rep("\u{61}",0x493e0)
245assert(string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{24}"))
245assert(string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{24}"))
246−assert(not string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{62}\u{24}"))
246+assert((not string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{62}\u{24}")))
247assert(string.find(a,"\u{5e}\u{61}\u{2d}\u{2e}\u{3f}\u{24}"))
247assert(string.find(a,"\u{5e}\u{61}\u{2d}\u{2e}\u{3f}\u{24}"))
248a=(string.rep("\u{61}",0x2710) .. string.rep("\u{62}",0x2710))
248a=(string.rep("\u{61}",0x2710) .. string.rep("\u{62}",0x2710))
249−assert(not pcall(string.gsub,a,"\u{62}"))
249+assert((not pcall(string.gsub,a,"\u{62}")))
250end
250end
251local function rev
251local function rev
252(s)
252(s)
@@ -288,7 +288,7 @@ for i in string.gmatch("\u{78}\u{75}\u{78}\u{78}\u{20}\u{75}\u{75}\u{20}\u{70}\u
288do
288do
289assert((i == table.remove(t,0x1)))
289assert((i == table.remove(t,0x1)))
290end
290end
291−assert(# (t == 0x0))
291+assert((# (t == 0x0)))
292t={}
292t={}
293for i,j in string.gmatch("\u{31}\u{33}\u{20}\u{31}\u{34}\u{20}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{2c}\u{20}\u{31}\u{35}\u{3d}\u{20}\u{31}\u{36}\u{2c}\u{20}\u{32}\u{32}\u{3d}\u{32}\u{33}","\u{28}\u{25}\u{64}\u{2b}\u{29}\u{25}\u{73}\u{2a}\u{3d}\u{25}\u{73}\u{2a}\u{28}\u{25}\u{64}\u{2b}\u{29}")
293for i,j in string.gmatch("\u{31}\u{33}\u{20}\u{31}\u{34}\u{20}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{2c}\u{20}\u{31}\u{35}\u{3d}\u{20}\u{31}\u{36}\u{2c}\u{20}\u{32}\u{32}\u{3d}\u{32}\u{33}","\u{28}\u{25}\u{64}\u{2b}\u{29}\u{25}\u{73}\u{2a}\u{3d}\u{25}\u{73}\u{2a}\u{28}\u{25}\u{64}\u{2b}\u{29}")
294do
294do
@@ -310,7 +310,7 @@ s=(s + tonumber(k))
310end
310end
311assert((s == 0x32))
311assert((s == 0x32))
312s=0x0
312s=0x0
313−for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{64}\u{2b}",- 0x4)
313+for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{64}\u{2b}",(- 0x4))
314do
314do
315s=(s + tonumber(k))
315s=(s + tonumber(k))
316end
316end
@@ -339,8 +339,8 @@ assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{7a}\u{5d}") == 0x
339assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{5d}") == 0x2))
339assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{5d}") == 0x2))
340assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{61}\u{25}\u{7a}\u{5d}") == 0x3))
340assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{61}\u{25}\u{7a}\u{5d}") == 0x3))
341assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{7a}\u{5d}") == 0x4))
341assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{7a}\u{5d}") == 0x4))
342−assert(not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{6c}\u{25}\u{7a}\u{5d}"))
342+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
343−assert(not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{25}\u{7a}\u{5d}"))
343+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
344local i,e = string.find("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}")
344local i,e = string.find("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}")
345assert(((i == 0x2) and (e == 0x5)))
345assert(((i == 0x2) and (e == 0x5)))
346local k = string.match("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{28}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{29}")
346local k = string.match("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{28}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{29}")
@@ -350,12 +350,12 @@ for k in string.gmatch("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{74}\u
350do
350do
351assert((table.remove(a,0x1) == k))
351assert((table.remove(a,0x1) == k))
352end
352end
353−assert(# (a == 0x0))
353+assert((# (a == 0x0)))
354local function malform
354local function malform
355(p,m)
355(p,m)
356m=(m or "\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}")
356m=(m or "\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}")
357local r,msg = pcall(string.find,"\u{61}",p)
357local r,msg = pcall(string.find,"\u{61}",p)
358−assert(not (r and string.find(msg,m)))
358+assert((not (r and string.find(msg,m))))
359end
359end
360malform("\u{28}\u{2e}","\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
360malform("\u{28}\u{2e}","\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
361malform("\u{2e}\u{29}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{70}\u{61}\u{74}\u{74}\u{65}\u{72}\u{6e}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
361malform("\u{2e}\u{29}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{70}\u{61}\u{74}\u{74}\u{65}\u{72}\u{6e}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
desk/res/lua/cycled/sort.lua+24−24
@@ -6,7 +6,7 @@ local minI = math.mininteger
6local function checkerror
6local function checkerror
7(msg,f, ...)
7(msg,f, ...)
8local s,err = pcall(f,...)
8local s,err = pcall(f,...)
9−assert(not (s and string.find(err,msg)))
9+assert((not (s and string.find(err,msg))))
10end
10end
11checkerror("\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",table.insert,{},0x2,0x3,0x4)
11checkerror("\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",table.insert,{},0x2,0x3,0x4)
12local x,y,z,a,n
12local x,y,z,a,n
@@ -21,9 +21,9 @@ assert(((select(lim,unpack(a)) == lim) and (select("\u{23}",unpack(a)) == lim)))
21x=unpack(a)
21x=unpack(a)
22assert((x == 0x1))
22assert((x == 0x1))
23x={unpack(a)}
23x={unpack(a)}
24−assert(# (((x == lim) and (x[0x1] == 0x1)) and (x[lim] == lim)))
24+assert((# (((x == lim) and (x[0x1] == 0x1)) and (x[lim] == lim))))
25x={unpack(a,(lim - 0x2))}
25x={unpack(a,(lim - 0x2))}
26−assert(# (((x == 0x3) and (x[0x1] == (lim - 0x2))) and (x[0x3] == lim)))
26+assert((# (((x == 0x3) and (x[0x1] == (lim - 0x2))) and (x[0x3] == lim))))
27x={unpack(a,0xa,0x6)}
27x={unpack(a,0xa,0x6)}
28assert((next(x) == nil))
28assert((next(x) == nil))
29x={unpack(a,0xb,0xa)}
29x={unpack(a,0xb,0xa)}
@@ -38,13 +38,13 @@ a,x=unpack({0x1,0x2},0x1,0x1)
38assert(((a == 0x1) and (x == nil)))
38assert(((a == 0x1) and (x == nil)))
39do
39do
40local maxi = ((0x1 << 0x1f) - 0x1)
40local maxi = ((0x1 << 0x1f) - 0x1)
41−local mini = - (0x1 << 0x1f)
41+local mini = (- (0x1 << 0x1f))
42checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxi)
42checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxi)
43checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxi)
43checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxi)
44checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxI)
44checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxI)
45checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxI)
45checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxI)
46checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},mini,maxi)
46checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},mini,maxi)
47−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},- maxi,maxi)
47+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},(- maxi),maxi)
48checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},minI,maxI)
48checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},minI,maxI)
49unpack({},maxi,0x0)
49unpack({},maxi,0x0)
50unpack({},maxi,0x1)
50unpack({},maxi,0x1)
@@ -79,7 +79,7 @@ do
79local t = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
79local t = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
80return "\u{61}\u{62}\u{63}"
80return "\u{61}\u{62}\u{63}"
81end})
81end})
82−assert(# (t == "\u{61}\u{62}\u{63}"))
82+assert((# (t == "\u{61}\u{62}\u{63}")))
83checkerror("\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",table.insert,t,0x1)
83checkerror("\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",table.insert,t,0x1)
84end
84end
85print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}")
85print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}")
@@ -119,10 +119,10 @@ assert((table.move({0xa,0x14,0x1e},0x1,0x0,0x3,a) == a))
119eqT(a,{})
119eqT(a,{})
120a=table.move({0xa,0x14,0x1e},0x1,0xa,0x1)
120a=table.move({0xa,0x14,0x1e},0x1,0xa,0x1)
121eqT(a,{0xa,0x14,0x1e})
121eqT(a,{0xa,0x14,0x1e})
122−a=table.move({[(maxI - 0x2)] = 0x1,[(maxI - 0x1)] = 0x2,[maxI] = 0x3},(maxI - 0x2),maxI,- 0xa,{})
122+a=table.move({[(maxI - 0x2)] = 0x1,[(maxI - 0x1)] = 0x2,[maxI] = 0x3},(maxI - 0x2),maxI,(- 0xa),{})
123−eqT(a,{[- 0xa] = 0x1,[- 0x9] = 0x2,[- 0x8] = 0x3})
123+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
124−a=table.move({[minI] = 0x1,[(minI + 0x1)] = 0x2,[(minI + 0x2)] = 0x3},minI,(minI + 0x2),- 0xa,{})
124+a=table.move({[minI] = 0x1,[(minI + 0x1)] = 0x2,[(minI + 0x2)] = 0x3},minI,(minI + 0x2),(- 0xa),{})
125−eqT(a,{[- 0xa] = 0x1,[- 0x9] = 0x2,[- 0x8] = 0x3})
125+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
126a=table.move({0x2d},0x1,0x1,maxI)
126a=table.move({0x2d},0x1,0x1,maxI)
127eqT(a,{0x2d,[maxI] = 0x2d})
127eqT(a,{0x2d,[maxI] = 0x2d})
128a=table.move({[maxI] = 0x64},maxI,maxI,minI)
128a=table.move({[maxI] = 0x64},maxI,maxI,minI)
@@ -141,7 +141,7 @@ end})
141table.move(a,0xa,0xd,0x3,b)
141table.move(a,0xa,0xd,0x3,b)
142assert((b[0x1] == "\u{28}\u{33}\u{2c}\u{31}\u{30}\u{30}\u{29}\u{28}\u{34}\u{2c}\u{31}\u{31}\u{30}\u{29}\u{28}\u{35}\u{2c}\u{31}\u{32}\u{30}\u{29}\u{28}\u{36}\u{2c}\u{31}\u{33}\u{30}\u{29}"))
142assert((b[0x1] == "\u{28}\u{33}\u{2c}\u{31}\u{30}\u{30}\u{29}\u{28}\u{34}\u{2c}\u{31}\u{31}\u{30}\u{29}\u{28}\u{35}\u{2c}\u{31}\u{32}\u{30}\u{29}\u{28}\u{36}\u{2c}\u{31}\u{33}\u{30}\u{29}"))
143local stat,msg = pcall(table.move,b,0xa,0xd,0x3,b)
143local stat,msg = pcall(table.move,b,0xa,0xd,0x3,b)
144−assert(not (stat and (msg == b)))
144+assert((not (stat and (msg == b))))
145end
145end
146do
146do
147local function checkmove
147local function checkmove
@@ -155,27 +155,27 @@ pos2=k
155error()
155error()
156end})
156end})
157local st,msg = pcall(table.move,a,f,e,t)
157local st,msg = pcall(table.move,a,f,e,t)
158−assert(not (st and not ((msg and (pos1 == x)) and (pos2 == y))))
158+assert((not (st and (not ((msg and (pos1 == x)) and (pos2 == y))))))
159end
159end
160checkmove(0x1,maxI,0x0,0x1,0x0)
160checkmove(0x1,maxI,0x0,0x1,0x0)
161checkmove(0x0,(maxI - 0x1),0x1,(maxI - 0x1),maxI)
161checkmove(0x0,(maxI - 0x1),0x1,(maxI - 0x1),maxI)
162−checkmove(minI,- 0x2,- 0x5,- 0x2,(maxI - 0x6))
162+checkmove(minI,(- 0x2),(- 0x5),(- 0x2),(maxI - 0x6))
163−checkmove((minI + 0x1),- 0x1,- 0x2,- 0x1,(maxI - 0x3))
163+checkmove((minI + 0x1),(- 0x1),(- 0x2),(- 0x1),(maxI - 0x3))
164−checkmove(minI,- 0x2,0x0,minI,0x0)
164+checkmove(minI,(- 0x2),0x0,minI,0x0)
165−checkmove((minI + 0x1),- 0x1,0x1,(minI + 0x1),0x1)
165+checkmove((minI + 0x1),(- 0x1),0x1,(minI + 0x1),0x1)
166end
166end
167checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},0x0,maxI,0x1)
167checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},0x0,maxI,0x1)
168−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},- 0x1,(maxI - 0x1),0x1)
168+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},(- 0x1),(maxI - 0x1),0x1)
169−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,- 0x1,0x1)
169+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,(- 0x1),0x1)
170checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,maxI,0x1)
170checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,maxI,0x1)
171checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,maxI,0x2)
171checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,maxI,0x2)
172checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,0x2,maxI)
172checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,0x2,maxI)
173−checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,- 0x2,0x2)
173+checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,(- 0x2),0x2)
174print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{72}\u{74}")
174print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{72}\u{74}")
175local a = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
175local a = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
176−return - 0x1
176+return (- 0x1)
177end})
177end})
178−assert(# (a == - 0x1))
178+assert((# (a == (- 0x1))))
179table.sort(a,error)
179table.sort(a,error)
180a=setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
180a=setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
181return maxI
181return maxI
@@ -199,9 +199,9 @@ f=(f or function (x,y)
199return (x < y)
199return (x < y)
200end)
200end)
201;
201;
202−for n = # a, 0x2, - 0x1
202+for n = (# a), 0x2, (- 0x1)
203do
203do
204−assert(not f(a[n],a[(n - 0x1)]))
204+assert((not f(a[n],a[(n - 0x1)])))
205end
205end
206end
206end
207a={"\u{4a}\u{61}\u{6e}","\u{46}\u{65}\u{62}","\u{4d}\u{61}\u{72}","\u{41}\u{70}\u{72}","\u{4d}\u{61}\u{79}","\u{4a}\u{75}\u{6e}","\u{4a}\u{75}\u{6c}","\u{41}\u{75}\u{67}","\u{53}\u{65}\u{70}","\u{4f}\u{63}\u{74}","\u{4e}\u{6f}\u{76}","\u{44}\u{65}\u{63}"}
207a={"\u{4a}\u{61}\u{6e}","\u{46}\u{65}\u{62}","\u{4d}\u{61}\u{72}","\u{41}\u{70}\u{72}","\u{4d}\u{61}\u{79}","\u{4a}\u{75}\u{6e}","\u{4a}\u{75}\u{6c}","\u{41}\u{75}\u{67}","\u{53}\u{65}\u{70}","\u{4f}\u{63}\u{74}","\u{4e}\u{6f}\u{76}","\u{44}\u{65}\u{63}"}
@@ -209,7 +209,7 @@ table.sort(a)
209check(a)
209check(a)
210local function perm
210local function perm
211(s,n)
211(s,n)
212−n=(n or # s)
212+n=(n or (# s))
213if (n == 0x1) then
213if (n == 0x1) then
214local t = {unpack(s)}
214local t = {unpack(s)}
215table.sort(t)
215table.sort(t)
desk/res/lua/cycled/strings.lua+67−67
@@ -4,7 +4,7 @@ local mini <const> = math.mininteger
4local function checkerror
4local function checkerror
5(msg,f, ...)
5(msg,f, ...)
6local s,err = pcall(f,...)
6local s,err = pcall(f,...)
7−assert(not (s and string.find(err,msg)))
7+assert((not (s and string.find(err,msg))))
8end
8end
9assert(("\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{31}"))
9assert(("\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{31}"))
10assert(("" < "\u{61}"))
10assert(("" < "\u{61}"))
@@ -15,26 +15,26 @@ assert(("\u{61}\u{6c}\u{6f}\u{0}" > "\u{61}\u{6c}\u{6f}"))
15assert(("\u{0}" < "\u{1}"))
15assert(("\u{0}" < "\u{1}"))
16assert(("\u{0}\u{0}" < "\u{0}\u{1}"))
16assert(("\u{0}\u{0}" < "\u{0}\u{1}"))
17assert(("\u{1}\u{0}\u{61}\u{0}\u{61}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}"))
17assert(("\u{1}\u{0}\u{61}\u{0}\u{61}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}"))
18−assert(not ("\u{1}\u{0}\u{61}\u{0}\u{62}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}"))
18+assert((not ("\u{1}\u{0}\u{61}\u{0}\u{62}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}")))
19assert(("\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}\u{0}"))
19assert(("\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}\u{0}"))
20−assert(not ("\u{0}\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}"))
20+assert((not ("\u{0}\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}")))
21assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}\u{0}"))
21assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}\u{0}"))
22−assert(not ("\u{0}\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}"))
22+assert((not ("\u{0}\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}")))
23assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}"))
23assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}"))
24assert(("\u{0}\u{0}\u{0}" >= "\u{0}\u{0}\u{0}"))
24assert(("\u{0}\u{0}\u{0}" >= "\u{0}\u{0}\u{0}"))
25−assert(not ("\u{0}\u{0}\u{62}" < "\u{0}\u{0}\u{61}\u{0}"))
25+assert((not ("\u{0}\u{0}\u{62}" < "\u{0}\u{0}\u{61}\u{0}")))
26assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x2,0x4) == "\u{32}\u{33}\u{34}"))
26assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x2,0x4) == "\u{32}\u{33}\u{34}"))
27assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7) == "\u{37}\u{38}\u{39}"))
27assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7) == "\u{37}\u{38}\u{39}"))
28assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x6) == ""))
28assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x6) == ""))
29assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x7) == "\u{37}"))
29assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x7) == "\u{37}"))
30assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x0,0x0) == ""))
30assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x0,0x0) == ""))
31−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0xa,0xa) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
31+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),0xa) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
32assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x1,0x9) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
32assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x1,0x9) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
33−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0xa,- 0x14) == ""))
33+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),(- 0x14)) == ""))
34−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x1) == "\u{39}"))
34+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x1)) == "\u{39}"))
35−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x4) == "\u{36}\u{37}\u{38}\u{39}"))
35+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x4)) == "\u{36}\u{37}\u{38}\u{39}"))
36−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x6,- 0x4) == "\u{34}\u{35}\u{36}"))
36+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x6),(- 0x4)) == "\u{34}\u{35}\u{36}"))
37−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,- 0x4) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}"))
37+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,(- 0x4)) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}"))
38assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,maxi) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
38assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,maxi) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
39assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,mini) == ""))
39assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,mini) == ""))
40assert((string.sub("\u{0}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x3,0x5) == "\u{32}\u{33}\u{34}"))
40assert((string.sub("\u{0}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x3,0x5) == "\u{32}\u{33}\u{34}"))
@@ -44,42 +44,42 @@ local a,b = string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
44assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",a,b) == "\u{33}\u{34}\u{35}"))
44assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",a,b) == "\u{33}\u{34}\u{35}"))
45assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x3) == 0x3))
45assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x3) == 0x3))
46assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x4) == 0xd))
46assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x4) == 0xd))
47−assert(not string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{36}",0x4))
47+assert((not string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{36}",0x4)))
48−assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{2e}\u{34}\u{35}",- 0x9) == 0xd))
48+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{2e}\u{34}\u{35}",(- 0x9)) == 0xd))
49−assert(not string.find("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}","\u{0}",0x5,0x1))
49+assert((not string.find("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}","\u{0}",0x5,0x1)))
50assert((string.find("","") == 0x1))
50assert((string.find("","") == 0x1))
51assert((string.find("","",0x1) == 0x1))
51assert((string.find("","",0x1) == 0x1))
52−assert(not string.find("","",0x2))
52+assert((not string.find("","",0x2)))
53−assert(not string.find("","\u{61}\u{61}\u{61}",0x1))
53+assert((not string.find("","\u{61}\u{61}\u{61}",0x1)))
54assert((("\u{61}\u{6c}\u{6f}\u{28}\u{2e}\u{29}\u{61}\u{6c}\u{6f}"):find("\u{28}\u{2e}\u{29}",0x1,0x1) == 0x4))
54assert((("\u{61}\u{6c}\u{6f}\u{28}\u{2e}\u{29}\u{61}\u{6c}\u{6f}"):find("\u{28}\u{2e}\u{29}",0x1,0x1) == 0x4))
55assert((string.len("") == 0x0))
55assert((string.len("") == 0x0))
56assert((string.len("\u{0}\u{0}\u{0}") == 0x3))
56assert((string.len("\u{0}\u{0}\u{0}") == 0x3))
57assert((string.len("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}") == 0xa))
57assert((string.len("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}") == 0xa))
58−assert(# ("" == 0x0))
58+assert((# ("" == 0x0)))
59−assert(# ("\u{0}\u{0}\u{0}" == 0x3))
59+assert((# ("\u{0}\u{0}\u{0}" == 0x3)))
60−assert(# ("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}" == 0xa))
60+assert((# ("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}" == 0xa)))
61assert((string.byte("\u{61}") == 0x61))
61assert((string.byte("\u{61}") == 0x61))
62assert((string.byte("\u{e4}") > 0x7f))
62assert((string.byte("\u{e4}") > 0x7f))
63assert((string.byte(string.char(0xff)) == 0xff))
63assert((string.byte(string.char(0xff)) == 0xff))
64assert((string.byte(string.char(0x0)) == 0x0))
64assert((string.byte(string.char(0x0)) == 0x0))
65assert((string.byte("\u{0}") == 0x0))
65assert((string.byte("\u{0}") == 0x0))
66−assert((string.byte("\u{0}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{78}",- 0x1) == string.byte("\u{78}")))
66+assert((string.byte("\u{0}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{78}",(- 0x1)) == string.byte("\u{78}")))
67assert((string.byte("\u{62}\u{61}",0x2) == 0x61))
67assert((string.byte("\u{62}\u{61}",0x2) == 0x61))
68−assert((string.byte("\u{a}\u{a}",0x2,- 0x1) == 0xa))
68+assert((string.byte("\u{a}\u{a}",0x2,(- 0x1)) == 0xa))
69assert((string.byte("\u{a}\u{a}",0x2,0x2) == 0xa))
69assert((string.byte("\u{a}\u{a}",0x2,0x2) == 0xa))
70assert((string.byte("") == nil))
70assert((string.byte("") == nil))
71−assert((string.byte("\u{68}\u{69}",- 0x3) == nil))
71+assert((string.byte("\u{68}\u{69}",(- 0x3)) == nil))
72assert((string.byte("\u{68}\u{69}",0x3) == nil))
72assert((string.byte("\u{68}\u{69}",0x3) == nil))
73assert((string.byte("\u{68}\u{69}",0x9,0xa) == nil))
73assert((string.byte("\u{68}\u{69}",0x9,0xa) == nil))
74assert((string.byte("\u{68}\u{69}",0x2,0x1) == nil))
74assert((string.byte("\u{68}\u{69}",0x2,0x1) == nil))
75assert((string.char() == ""))
75assert((string.char() == ""))
76assert((string.char(0x0,0xff,0x0) == "\u{0}\u{ff}\u{0}"))
76assert((string.char(0x0,0xff,0x0) == "\u{0}\u{ff}\u{0}"))
77assert((string.char(0x0,string.byte("\u{e4}"),0x0) == "\u{0}\u{e4}\u{0}"))
77assert((string.char(0x0,string.byte("\u{e4}"),0x0) == "\u{0}\u{e4}\u{0}"))
78−assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,- 0x1)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
78+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,(- 0x1))) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
79assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,0x0)) == ""))
79assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,0x0)) == ""))
80−assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",- 0xa,0x64)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
80+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",(- 0xa),0x64)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
81checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,0x100)
81checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,0x100)
82−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,- 0x1)
82+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,(- 0x1))
83checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.maxinteger)
83checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.maxinteger)
84checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.mininteger)
84checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.mininteger)
85assert((string.upper("\u{61}\u{62}\u{0}\u{63}") == "\u{41}\u{42}\u{0}\u{43}"))
85assert((string.upper("\u{61}\u{62}\u{0}\u{63}") == "\u{41}\u{42}\u{0}\u{43}"))
@@ -95,8 +95,8 @@ assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x0,"\u{78}\u{75}\u{78}\u{75
95assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x1,"\u{78}\u{75}\u{78}\u{75}") == "\u{74}\u{65}\u{73}\u{74}\u{65}"))
95assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x1,"\u{78}\u{75}\u{78}\u{75}") == "\u{74}\u{65}\u{73}\u{74}\u{65}"))
96assert((string.rep("\u{1}\u{0}\u{1}",0x2,"\u{0}\u{0}") == "\u{1}\u{0}\u{1}\u{0}\u{0}\u{1}\u{0}\u{1}"))
96assert((string.rep("\u{1}\u{0}\u{1}",0x2,"\u{0}\u{0}") == "\u{1}\u{0}\u{1}\u{0}\u{0}\u{1}\u{0}\u{1}"))
97assert((string.rep("",0xa,"\u{2e}") == string.rep("\u{2e}",0x9)))
97assert((string.rep("",0xa,"\u{2e}") == string.rep("\u{2e}",0x9)))
98−assert(not pcall(string.rep,"\u{61}\u{61}",((maxi // 0x2) + 0xa)))
98+assert((not pcall(string.rep,"\u{61}\u{61}",((maxi // 0x2) + 0xa))))
99−assert(not pcall(string.rep,"",((maxi // 0x2) + 0xa),"\u{61}\u{61}"))
99+assert((not pcall(string.rep,"",((maxi // 0x2) + 0xa),"\u{61}\u{61}")))
100assert((string.reverse("") == ""))
100assert((string.reverse("") == ""))
101assert((string.reverse("\u{0}\u{1}\u{2}\u{3}") == "\u{3}\u{2}\u{1}\u{0}"))
101assert((string.reverse("\u{0}\u{1}\u{2}\u{3}") == "\u{3}\u{2}\u{1}\u{0}"))
102assert((string.reverse("\u{0}\u{31}\u{32}\u{33}\u{34}") == "\u{34}\u{33}\u{32}\u{31}\u{0}"))
102assert((string.reverse("\u{0}\u{31}\u{32}\u{33}\u{34}") == "\u{34}\u{33}\u{32}\u{31}\u{0}"))
@@ -108,27 +108,27 @@ assert((type(tostring(nil)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
108assert((type(tostring(0xc)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
108assert((type(tostring(0xc)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
109assert(string.find(tostring({}),"\u{74}\u{61}\u{62}\u{6c}\u{65}\u{3a}"))
109assert(string.find(tostring({}),"\u{74}\u{61}\u{62}\u{6c}\u{65}\u{3a}"))
110assert(string.find(tostring(print),"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{3a}"))
110assert(string.find(tostring(print),"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{3a}"))
111−assert(# (tostring("\u{0}") == 0x1))
111+assert((# (tostring("\u{0}") == 0x1)))
112assert((tostring(true) == "\u{74}\u{72}\u{75}\u{65}"))
112assert((tostring(true) == "\u{74}\u{72}\u{75}\u{65}"))
113assert((tostring(false) == "\u{66}\u{61}\u{6c}\u{73}\u{65}"))
113assert((tostring(false) == "\u{66}\u{61}\u{6c}\u{73}\u{65}"))
114−assert((tostring(- 0x4b3) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
114+assert((tostring((- 0x4b3)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
115assert((tostring(1203.125) == "\u{31}\u{32}\u{30}\u{33}\u{2e}\u{31}\u{32}\u{35}"))
115assert((tostring(1203.125) == "\u{31}\u{32}\u{30}\u{33}\u{2e}\u{31}\u{32}\u{35}"))
116−assert((tostring(- 0.5) == "\u{2d}\u{30}\u{2e}\u{35}"))
116+assert((tostring((- 0.5)) == "\u{2d}\u{30}\u{2e}\u{35}"))
117−assert((tostring(- 0x7fff) == "\u{2d}\u{33}\u{32}\u{37}\u{36}\u{37}"))
117+assert((tostring((- 0x7fff)) == "\u{2d}\u{33}\u{32}\u{37}\u{36}\u{37}"))
118if math.tointeger(0x7fffffff) then
118if math.tointeger(0x7fffffff) then
119−assert((tostring(- 0x7fffffff) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
119+assert((tostring((- 0x7fffffff)) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
120end
120end
121if math.tointeger(0x4000000000000000) then
121if math.tointeger(0x4000000000000000) then
122assert((tostring(0x4000000000000000) == "\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
122assert((tostring(0x4000000000000000) == "\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
123−assert((tostring(- 0x4000000000000000) == "\u{2d}\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
123+assert((tostring((- 0x4000000000000000)) == "\u{2d}\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
124end
124end
125if (tostring(0.0) == "\u{30}\u{2e}\u{30}") then
125if (tostring(0.0) == "\u{30}\u{2e}\u{30}") then
126assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}\u{2e}\u{30}")))
126assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}\u{2e}\u{30}")))
127−assert((tostring(- (0x4b3 + 0.0)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}\u{2e}\u{30}"))
127+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}\u{2e}\u{30}"))
128else
128else
129assert((tostring(0.0) == "\u{30}"))
129assert((tostring(0.0) == "\u{30}"))
130assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}")))
130assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}")))
131−assert((tostring(- (0x4b3 + 0.0)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
131+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
132end
132end
133do
133do
134local null = "\u{28}\u{6e}\u{75}\u{6c}\u{6c}\u{29}"
134local null = "\u{28}\u{6e}\u{75}\u{6c}\u{6c}\u{29}"
@@ -142,10 +142,10 @@ assert((string.format("\u{25}\u{70}",io.stdin) ~= null))
142assert((string.format("\u{25}\u{70}",io.stdin) == string.format("\u{25}\u{70}",io.stdin)))
142assert((string.format("\u{25}\u{70}",io.stdin) == string.format("\u{25}\u{70}",io.stdin)))
143assert((string.format("\u{25}\u{70}",print) == string.format("\u{25}\u{70}",print)))
143assert((string.format("\u{25}\u{70}",print) == string.format("\u{25}\u{70}",print)))
144assert((string.format("\u{25}\u{70}",print) ~= string.format("\u{25}\u{70}",assert)))
144assert((string.format("\u{25}\u{70}",print) ~= string.format("\u{25}\u{70}",assert)))
145−assert(# (string.format("\u{25}\u{39}\u{30}\u{70}",{}) == 0x5a))
145+assert((# (string.format("\u{25}\u{39}\u{30}\u{70}",{}) == 0x5a)))
146−assert(# (string.format("\u{25}\u{2d}\u{36}\u{30}\u{70}",{}) == 0x3c))
146+assert((# (string.format("\u{25}\u{2d}\u{36}\u{30}\u{70}",{}) == 0x3c)))
147−assert((string.format("\u{25}\u{31}\u{30}\u{70}",false) == (string.rep("\u{20}",(0xa - # null)) .. null)))
147+assert((string.format("\u{25}\u{31}\u{30}\u{70}",false) == (string.rep("\u{20}",(0xa - (# null))) .. null)))
148−assert((string.format("\u{25}\u{2d}\u{31}\u{32}\u{70}",1.5) == (null .. string.rep("\u{20}",(0xc - # null)))))
148+assert((string.format("\u{25}\u{2d}\u{31}\u{32}\u{70}",1.5) == (null .. string.rep("\u{20}",(0xc - (# null))))))
149do
149do
150local t1 = {}
150local t1 = {}
151;
151;
@@ -195,7 +195,7 @@ checkQ(true)
195checkQ(nil)
195checkQ(nil)
196checkQ(false)
196checkQ(false)
197checkQ(math.huge)
197checkQ(math.huge)
198−checkQ(- math.huge)
198+checkQ((- math.huge))
199assert((string.format("\u{25}\u{71}",(0x0 / 0x0)) == "\u{28}\u{30}\u{2f}\u{30}\u{29}"))
199assert((string.format("\u{25}\u{71}",(0x0 / 0x0)) == "\u{28}\u{30}\u{2f}\u{30}\u{29}"))
200checkerror("\u{6e}\u{6f}\u{20}\u{6c}\u{69}\u{74}\u{65}\u{72}\u{61}\u{6c}",string.format,"\u{25}\u{71}",{})
200checkerror("\u{6e}\u{6f}\u{20}\u{6c}\u{69}\u{74}\u{65}\u{72}\u{61}\u{6c}",string.format,"\u{25}\u{71}",{})
201end
201end
@@ -218,7 +218,7 @@ assert((string.format("\u{25}\u{78}",0.0) == "\u{30}"))
218assert((string.format("\u{25}\u{30}\u{32}\u{78}",0.0) == "\u{30}\u{30}"))
218assert((string.format("\u{25}\u{30}\u{32}\u{78}",0.0) == "\u{30}\u{30}"))
219assert((string.format("\u{25}\u{30}\u{38}\u{58}",0xffffffff) == "\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}"))
219assert((string.format("\u{25}\u{30}\u{38}\u{58}",0xffffffff) == "\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}"))
220assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",0x7b0d) == "\u{2b}\u{30}\u{30}\u{33}\u{31}\u{35}\u{30}\u{31}"))
220assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",0x7b0d) == "\u{2b}\u{30}\u{30}\u{33}\u{31}\u{35}\u{30}\u{31}"))
221−assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",- 0x78cf) == "\u{2d}\u{30}\u{30}\u{33}\u{30}\u{39}\u{32}\u{37}"))
221+assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",(- 0x78cf)) == "\u{2d}\u{30}\u{30}\u{33}\u{30}\u{39}\u{32}\u{37}"))
222do
222do
223local i = 0x1
223local i = 0x1
224local j = 0x2710
224local j = 0x2710
@@ -231,34 +231,34 @@ j=m
231end
231end
232end
232end
233assert((((0xa ^ i) < math.huge) and ((0xa ^ j) == math.huge)))
233assert((((0xa ^ i) < math.huge) and ((0xa ^ j) == math.huge)))
234−local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",- (0xa ^ i))
234+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ i)))
235assert((string.len(s) >= (i + 0x65)))
235assert((string.len(s) >= (i + 0x65)))
236−assert((tonumber(s) == - (0xa ^ i)))
236+assert((tonumber(s) == (- (0xa ^ i))))
237assert(((0xa ^ 0x26) < math.huge))
237assert(((0xa ^ 0x26) < math.huge))
238−local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",- (0xa ^ 0x26))
238+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ 0x26)))
239assert((string.len(s) >= (0x26 + 0x65)))
239assert((string.len(s) >= (0x26 + 0x65)))
240−assert((tonumber(s) == - (0xa ^ 0x26)))
240+assert((tonumber(s) == (- (0xa ^ 0x26))))
241end
241end
242do
242do
243−local max,min = 0x7fffffff,- 0x80000000
243+local max,min = 0x7fffffff,(- 0x80000000)
244−assert((string.sub(string.format("\u{25}\u{38}\u{78}",- 0x1),- 0x8) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
244+assert((string.sub(string.format("\u{25}\u{38}\u{78}",(- 0x1)),(- 0x8)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
245assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
245assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
246−assert((string.sub(string.format("\u{25}\u{78}",min),- 0x8) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
246+assert((string.sub(string.format("\u{25}\u{78}",min),(- 0x8)) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
247assert((string.format("\u{25}\u{64}",max) == "\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
247assert((string.format("\u{25}\u{64}",max) == "\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
248assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"))
248assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"))
249assert((string.format("\u{25}\u{75}",0xffffffff) == "\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"))
249assert((string.format("\u{25}\u{75}",0xffffffff) == "\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"))
250assert((string.format("\u{25}\u{6f}",0xabcd) == "\u{31}\u{32}\u{35}\u{37}\u{31}\u{35}"))
250assert((string.format("\u{25}\u{6f}",0xabcd) == "\u{31}\u{32}\u{35}\u{37}\u{31}\u{35}"))
251−max,min=0x7fffffffffffffff,- 0x8000000000000000
251+max,min=0x7fffffffffffffff,(- 0x8000000000000000)
252if (max > (2.0 ^ 0x35)) then
252if (max > (2.0 ^ 0x35)) then
253assert((string.format("\u{25}\u{78}",(((0x2 ^ 0x34) | 0x0) - 0x1)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
253assert((string.format("\u{25}\u{78}",(((0x2 ^ 0x34) | 0x0) - 0x1)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
254assert((string.format("\u{30}\u{78}\u{25}\u{38}\u{58}",0x8f000003) == "\u{30}\u{78}\u{38}\u{46}\u{30}\u{30}\u{30}\u{30}\u{30}\u{33}"))
254assert((string.format("\u{30}\u{78}\u{25}\u{38}\u{58}",0x8f000003) == "\u{30}\u{78}\u{38}\u{46}\u{30}\u{30}\u{30}\u{30}\u{30}\u{33}"))
255assert((string.format("\u{25}\u{64}",(0x2 ^ 0x35)) == "\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
255assert((string.format("\u{25}\u{64}",(0x2 ^ 0x35)) == "\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
256−assert((string.format("\u{25}\u{69}",- (0x2 ^ 0x35)) == "\u{2d}\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
256+assert((string.format("\u{25}\u{69}",(- (0x2 ^ 0x35))) == "\u{2d}\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
257assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
257assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
258assert((string.format("\u{25}\u{78}",min) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
258assert((string.format("\u{25}\u{78}",min) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
259assert((string.format("\u{25}\u{64}",max) == "\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{37}"))
259assert((string.format("\u{25}\u{64}",max) == "\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{37}"))
260assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{38}"))
260assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{38}"))
261−assert((string.format("\u{25}\u{75}",~ (- (0x1 << 0x40))) == "\u{31}\u{38}\u{34}\u{34}\u{36}\u{37}\u{34}\u{34}\u{30}\u{37}\u{33}\u{37}\u{30}\u{39}\u{35}\u{35}\u{31}\u{36}\u{31}\u{35}"))
261+assert((string.format("\u{25}\u{75}",(~ (- (0x1 << 0x40)))) == "\u{31}\u{38}\u{34}\u{34}\u{36}\u{37}\u{34}\u{34}\u{30}\u{37}\u{33}\u{37}\u{30}\u{39}\u{35}\u{35}\u{31}\u{36}\u{31}\u{35}"))
262assert((tostring(0x11f71fb04cb) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}"))
262assert((tostring(0x11f71fb04cb) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}"))
263end
263end
264end
264end
@@ -273,30 +273,30 @@ s=string.format("\u{25}\u{41}",n)
273assert(string.find(s,"\u{5e}\u{25}\u{2d}\u{3f}\u{30}\u{58}\u{5b}\u{31}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{25}\u{2e}\u{3f}\u{5b}\u{30}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{2a}\u{50}\u{5b}\u{2d}\u{2b}\u{5d}\u{3f}\u{25}\u{64}\u{2b}\u{24}"))
273assert(string.find(s,"\u{5e}\u{25}\u{2d}\u{3f}\u{30}\u{58}\u{5b}\u{31}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{25}\u{2e}\u{3f}\u{5b}\u{30}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{2a}\u{50}\u{5b}\u{2d}\u{2b}\u{5d}\u{3f}\u{25}\u{64}\u{2b}\u{24}"))
274assert((tonumber(s) == n))
274assert((tonumber(s) == n))
275end
275end
276−for _,n in ipairs({0.1,- 0.1,(0x1 / 0x3),- (0x1 / 0x3),1e30,- 1e30,- (0x2d / 0xf7),0x1,- 0x1,0x2,- 0x2,3e-20,- 3e-20})
276+for _,n in ipairs({0.1,(- 0.1),(0x1 / 0x3),(- (0x1 / 0x3)),1e30,(- 1e30),(- (0x2d / 0xf7)),0x1,(- 0x1),0x2,(- 0x2),3e-20,(- 3e-20)})
277do
277do
278matchhexa(n)
278matchhexa(n)
279end
279end
280assert(string.find(string.format("\u{25}\u{41}",0.0),"\u{5e}\u{30}\u{58}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{50}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
280assert(string.find(string.format("\u{25}\u{41}",0.0),"\u{5e}\u{30}\u{58}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{50}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
281−assert(string.find(string.format("\u{25}\u{61}",- 0.0),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{70}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
281+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{70}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
282−if not _port then
282+if (not _port) then
283assert(string.find(string.format("\u{25}\u{61}",(0x1 / 0x0)),"\u{5e}\u{69}\u{6e}\u{66}"))
283assert(string.find(string.format("\u{25}\u{61}",(0x1 / 0x0)),"\u{5e}\u{69}\u{6e}\u{66}"))
284−assert(string.find(string.format("\u{25}\u{41}",- (0x1 / 0x0)),"\u{5e}\u{25}\u{2d}\u{49}\u{4e}\u{46}"))
284+assert(string.find(string.format("\u{25}\u{41}",(- (0x1 / 0x0))),"\u{5e}\u{25}\u{2d}\u{49}\u{4e}\u{46}"))
285assert(string.find(string.format("\u{25}\u{61}",(0x0 / 0x0)),"\u{5e}\u{25}\u{2d}\u{3f}\u{6e}\u{61}\u{6e}"))
285assert(string.find(string.format("\u{25}\u{61}",(0x0 / 0x0)),"\u{5e}\u{25}\u{2d}\u{3f}\u{6e}\u{61}\u{6e}"))
286−assert(string.find(string.format("\u{25}\u{61}",- 0.0),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}"))
286+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}"))
287end
287end
288−if not pcall(string.format,"\u{25}\u{2e}\u{33}\u{61}",0x0) then
288+if (not pcall(string.format,"\u{25}\u{2e}\u{33}\u{61}",0x0)) then
289(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{27}\u{25}\u{61}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
289(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{27}\u{25}\u{61}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
290else
290else
291assert(string.find(string.format("\u{25}\u{2b}\u{2e}\u{32}\u{41}",0xc),"\u{5e}\u{25}\u{2b}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
291assert(string.find(string.format("\u{25}\u{2b}\u{2e}\u{32}\u{41}",0xc),"\u{5e}\u{25}\u{2b}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
292−assert(string.find(string.format("\u{25}\u{2e}\u{34}\u{41}",- 0xc),"\u{5e}\u{25}\u{2d}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{30}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
292+assert(string.find(string.format("\u{25}\u{2e}\u{34}\u{41}",(- 0xc)),"\u{5e}\u{25}\u{2d}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{30}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
293end
293end
294end
294end
295assert((string.format("\u{25}\u{23}\u{31}\u{32}\u{6f}",0xa) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{31}\u{32}"))
295assert((string.format("\u{25}\u{23}\u{31}\u{32}\u{6f}",0xa) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{31}\u{32}"))
296assert((string.format("\u{25}\u{23}\u{31}\u{30}\u{78}",0x64) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{78}\u{36}\u{34}"))
296assert((string.format("\u{25}\u{23}\u{31}\u{30}\u{78}",0x64) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{78}\u{36}\u{34}"))
297assert((string.format("\u{25}\u{23}\u{2d}\u{31}\u{37}\u{58}",0x64) == "\u{30}\u{58}\u{36}\u{34}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
297assert((string.format("\u{25}\u{23}\u{2d}\u{31}\u{37}\u{58}",0x64) == "\u{30}\u{58}\u{36}\u{34}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
298−assert((string.format("\u{25}\u{30}\u{31}\u{33}\u{69}",- 0x64) == "\u{2d}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}"))
298+assert((string.format("\u{25}\u{30}\u{31}\u{33}\u{69}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}"))
299−assert((string.format("\u{25}\u{32}\u{2e}\u{35}\u{64}",- 0x64) == "\u{2d}\u{30}\u{30}\u{31}\u{30}\u{30}"))
299+assert((string.format("\u{25}\u{32}\u{2e}\u{35}\u{64}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{31}\u{30}\u{30}"))
300assert((string.format("\u{25}\u{2e}\u{75}",0x0) == ""))
300assert((string.format("\u{25}\u{2e}\u{75}",0x0) == ""))
301assert((string.format("\u{25}\u{2b}\u{23}\u{30}\u{31}\u{34}\u{2e}\u{30}\u{66}",0x64) == "\u{2b}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}\u{2e}"))
301assert((string.format("\u{25}\u{2b}\u{23}\u{30}\u{31}\u{34}\u{2e}\u{30}\u{66}",0x64) == "\u{2b}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}\u{2e}"))
302assert((string.format("\u{25}\u{2d}\u{31}\u{36}\u{63}",0x61) == "\u{61}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
302assert((string.format("\u{25}\u{2d}\u{31}\u{36}\u{63}",0x61) == "\u{61}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
@@ -348,7 +348,7 @@ assert((table.concat({},"\u{78}",(mini + 0x1),mini) == ""))
348assert((table.concat({},"\u{78}",maxi,mini) == ""))
348assert((table.concat({},"\u{78}",maxi,mini) == ""))
349assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}"},"\u{78}",maxi,maxi) == "\u{61}\u{6c}\u{6f}"))
349assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}"},"\u{78}",maxi,maxi) == "\u{61}\u{6c}\u{6f}"))
350assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}",[(maxi - 0x1)] = "\u{79}"},"\u{2d}",(maxi - 0x1),maxi) == "\u{79}\u{2d}\u{61}\u{6c}\u{6f}"))
350assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}",[(maxi - 0x1)] = "\u{79}"},"\u{2d}",(maxi - 0x1),maxi) == "\u{79}\u{2d}\u{61}\u{6c}\u{6f}"))
351−assert(not pcall(table.concat,{"\u{61}","\u{62}",{}}))
351+assert((not pcall(table.concat,{"\u{61}","\u{62}",{}})))
352a={"\u{61}","\u{62}","\u{63}"}
352a={"\u{61}","\u{62}","\u{63}"}
353assert((table.concat(a,"\u{2c}",0x1,0x0) == ""))
353assert((table.concat(a,"\u{2c}",0x1,0x0) == ""))
354assert((table.concat(a,"\u{2c}",0x1,0x1) == "\u{61}"))
354assert((table.concat(a,"\u{2c}",0x1,0x1) == "\u{61}"))
@@ -356,11 +356,11 @@ assert((table.concat(a,"\u{2c}",0x1,0x2) == "\u{61}\u{2c}\u{62}"))
356assert((table.concat(a,"\u{2c}",0x2) == "\u{62}\u{2c}\u{63}"))
356assert((table.concat(a,"\u{2c}",0x2) == "\u{62}\u{2c}\u{63}"))
357assert((table.concat(a,"\u{2c}",0x3) == "\u{63}"))
357assert((table.concat(a,"\u{2c}",0x3) == "\u{63}"))
358assert((table.concat(a,"\u{2c}",0x4) == ""))
358assert((table.concat(a,"\u{2c}",0x4) == ""))
359−if not _port then
359+if (not _port) then
360local locales = {"\u{70}\u{74}\u{62}","\u{70}\u{74}\u{5f}\u{42}\u{52}\u{2e}\u{69}\u{73}\u{6f}\u{38}\u{38}\u{35}\u{39}\u{31}","\u{49}\u{53}\u{4f}\u{2d}\u{38}\u{38}\u{35}\u{39}\u{2d}\u{31}"}
360local locales = {"\u{70}\u{74}\u{62}","\u{70}\u{74}\u{5f}\u{42}\u{52}\u{2e}\u{69}\u{73}\u{6f}\u{38}\u{38}\u{35}\u{39}\u{31}","\u{49}\u{53}\u{4f}\u{2d}\u{38}\u{38}\u{35}\u{39}\u{2d}\u{31}"}
361local function trylocale
361local function trylocale
362(w)
362(w)
363−for i = 0x1, # locales
363+for i = 0x1, (# locales)
364do
364do
365if os.setlocale(locales[i],w) then
365if os.setlocale(locales[i],w) then
366print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{73}\u{65}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{25}\u{73}\u{27}",w,locales[i]))
366print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{73}\u{65}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{25}\u{73}\u{27}",w,locales[i]))
@@ -397,7 +397,7 @@ local blen = 0xc8
397local function callpfs
397local function callpfs
398(op,fmt,n)
398(op,fmt,n)
399local x = {T.testC(("\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" .. (op .. "\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")),fmt,n)}
399local x = {T.testC(("\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" .. (op .. "\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")),fmt,n)}
400−assert(# (x == 0x4))
400+assert((# (x == 0x4)))
401return x[0x4]
401return x[0x4]
402end
402end
403local function testpfs
403local function testpfs
@@ -410,13 +410,13 @@ testpfs("\u{49}",string.rep("\u{61}",blen),0x0)
410testpfs("\u{49}",string.rep("\u{61}",(blen + 0x1)),0x0)
410testpfs("\u{49}",string.rep("\u{61}",(blen + 0x1)),0x0)
411local str = (string.rep("\u{61}\u{62}",blen) .. ("\u{25}\u{64}" .. string.rep("\u{64}",(blen / 0x2))))
411local str = (string.rep("\u{61}\u{62}",blen) .. ("\u{25}\u{64}" .. string.rep("\u{64}",(blen / 0x2))))
412testpfs("\u{49}",str,(0x2 ^ 0xe))
412testpfs("\u{49}",str,(0x2 ^ 0xe))
413−testpfs("\u{49}",str,- (0x2 ^ 0xf))
413+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
414str=("\u{25}\u{64}" .. string.rep("\u{63}\u{64}",blen))
414str=("\u{25}\u{64}" .. string.rep("\u{63}\u{64}",blen))
415testpfs("\u{49}",str,(0x2 ^ 0xe))
415testpfs("\u{49}",str,(0x2 ^ 0xe))
416−testpfs("\u{49}",str,- (0x2 ^ 0xf))
416+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
417str=(string.rep("\u{63}",(blen - 0x2)) .. "\u{25}\u{64}")
417str=(string.rep("\u{63}",(blen - 0x2)) .. "\u{25}\u{64}")
418testpfs("\u{49}",str,(0x2 ^ 0xe))
418testpfs("\u{49}",str,(0x2 ^ 0xe))
419−testpfs("\u{49}",str,- (0x2 ^ 0xf))
419+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
420for l = 0xc, 0xe
420for l = 0xc, 0xe
421do
421do
422local str1 = string.rep("\u{61}",l)
422local str1 = string.rep("\u{61}",l)
desk/res/lua/cycled/tpack.lua+30−30
@@ -21,23 +21,23 @@ print(("\u{9}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}\u{3a}\u{20}"
21local function checkerror
21local function checkerror
22(msg,f, ...)
22(msg,f, ...)
23local status,err = pcall(f,...)
23local status,err = pcall(f,...)
24−assert(not (status and string.find(err,msg)))
24+assert((not (status and string.find(err,msg))))
25end
25end
26assert((unpack("\u{42}",pack("\u{42}",0xff)) == 0xff))
26assert((unpack("\u{42}",pack("\u{42}",0xff)) == 0xff))
27assert((unpack("\u{62}",pack("\u{62}",0x7f)) == 0x7f))
27assert((unpack("\u{62}",pack("\u{62}",0x7f)) == 0x7f))
28−assert((unpack("\u{62}",pack("\u{62}",- 0x80)) == - 0x80))
28+assert((unpack("\u{62}",pack("\u{62}",(- 0x80))) == (- 0x80)))
29assert((unpack("\u{48}",pack("\u{48}",0xffff)) == 0xffff))
29assert((unpack("\u{48}",pack("\u{48}",0xffff)) == 0xffff))
30assert((unpack("\u{68}",pack("\u{68}",0x7fff)) == 0x7fff))
30assert((unpack("\u{68}",pack("\u{68}",0x7fff)) == 0x7fff))
31−assert((unpack("\u{68}",pack("\u{68}",- 0x8000)) == - 0x8000))
31+assert((unpack("\u{68}",pack("\u{68}",(- 0x8000))) == (- 0x8000)))
32assert((unpack("\u{4c}",pack("\u{4c}",0xffffffff)) == 0xffffffff))
32assert((unpack("\u{4c}",pack("\u{4c}",0xffffffff)) == 0xffffffff))
33assert((unpack("\u{6c}",pack("\u{6c}",0x7fffffff)) == 0x7fffffff))
33assert((unpack("\u{6c}",pack("\u{6c}",0x7fffffff)) == 0x7fffffff))
34−assert((unpack("\u{6c}",pack("\u{6c}",- 0x80000000)) == - 0x80000000))
34+assert((unpack("\u{6c}",pack("\u{6c}",(- 0x80000000))) == (- 0x80000000)))
35for i = 0x1, NB
35for i = 0x1, NB
36do
36do
37local s = string.rep("\u{ff}",i)
37local s = string.rep("\u{ff}",i)
38−assert((pack(("\u{69}" .. i),- 0x1) == s))
38+assert((pack(("\u{69}" .. i),(- 0x1)) == s))
39−assert((packsize(("\u{69}" .. i)) == # s))
39+assert((packsize(("\u{69}" .. i)) == (# s)))
40−assert((unpack(("\u{69}" .. i),s) == - 0x1))
40+assert((unpack(("\u{69}" .. i),s) == (- 0x1)))
41s=("\u{aa}" .. string.rep("\u{0}",(i - 0x1)))
41s=("\u{aa}" .. string.rep("\u{0}",(i - 0x1)))
42assert((pack(("\u{3c}\u{49}" .. i),0xaa) == s))
42assert((pack(("\u{3c}\u{49}" .. i),0xaa) == s))
43assert((unpack(("\u{3c}\u{49}" .. i),s) == 0xaa))
43assert((unpack(("\u{3c}\u{49}" .. i),s) == 0xaa))
@@ -52,11 +52,11 @@ assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
52assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
52assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
53for i = (sizeLI + 0x1), NB
53for i = (sizeLI + 0x1), NB
54do
54do
55−local s = pack("\u{3c}\u{6a}",- lnum)
55+local s = pack("\u{3c}\u{6a}",(- lnum))
56−assert((unpack("\u{3c}\u{6a}",s) == - lnum))
56+assert((unpack("\u{3c}\u{6a}",s) == (- lnum)))
57−assert((unpack(("\u{3c}\u{69}" .. i),(s .. ("\u{ff}"):rep((i - sizeLI)))) == - lnum))
57+assert((unpack(("\u{3c}\u{69}" .. i),(s .. ("\u{ff}"):rep((i - sizeLI)))) == (- lnum)))
58−assert((unpack(("\u{3e}\u{69}" .. i),(("\u{ff}"):rep((i - sizeLI)) .. s:reverse())) == - lnum))
58+assert((unpack(("\u{3e}\u{69}" .. i),(("\u{ff}"):rep((i - sizeLI)) .. s:reverse())) == (- lnum)))
59−assert((unpack(("\u{3c}\u{49}" .. i),(s .. ("\u{0}"):rep((i - sizeLI)))) == - lnum))
59+assert((unpack(("\u{3c}\u{49}" .. i),(s .. ("\u{0}"):rep((i - sizeLI)))) == (- lnum)))
60checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3c}\u{49}" .. i),(("\u{0}"):rep((i - 0x1)) .. "\u{1}"))
60checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3c}\u{49}" .. i),(("\u{0}"):rep((i - 0x1)) .. "\u{1}"))
61checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3e}\u{69}" .. i),("\u{1}" .. ("\u{0}"):rep((i - 0x1))))
61checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3e}\u{69}" .. i),("\u{1}" .. ("\u{0}"):rep((i - 0x1))))
62end
62end
@@ -75,7 +75,7 @@ do
75local u = 0xf0
75local u = 0xf0
76for i = 0x1, (sizeLI - 0x1)
76for i = 0x1, (sizeLI - 0x1)
77do
77do
78−assert((unpack(("\u{3c}\u{69}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == - 0x10))
78+assert((unpack(("\u{3c}\u{69}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == (- 0x10)))
79assert((unpack(("\u{3e}\u{49}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == u))
79assert((unpack(("\u{3e}\u{49}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == u))
80u=((u * 0x100) + 0xff)
80u=((u * 0x100) + 0xff)
81end
81end
@@ -109,8 +109,8 @@ for i = 0x1, (sizeLI - 0x1)
109do
109do
110local umax = ((0x1 << (i * 0x8)) - 0x1)
110local umax = ((0x1 << (i * 0x8)) - 0x1)
111local max = (umax >> 0x1)
111local max = (umax >> 0x1)
112−local min = ~ max
112+local min = (~ max)
113−checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),- 0x1)
113+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),(- 0x1))
114checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),min)
114checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),min)
115checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{49}" .. i),(umax + 0x1))
115checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{49}" .. i),(umax + 0x1))
116checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{69}" .. i),umax)
116checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{69}" .. i),umax)
@@ -122,14 +122,14 @@ assert((unpack(("\u{3e}\u{49}" .. i),pack(("\u{3e}\u{49}" .. i),umax)) == umax))
122end
122end
123assert((unpack("\u{3e}\u{6a}",pack("\u{3e}\u{6a}",math.maxinteger)) == math.maxinteger))
123assert((unpack("\u{3e}\u{6a}",pack("\u{3e}\u{6a}",math.maxinteger)) == math.maxinteger))
124assert((unpack("\u{3c}\u{6a}",pack("\u{3c}\u{6a}",math.mininteger)) == math.mininteger))
124assert((unpack("\u{3c}\u{6a}",pack("\u{3c}\u{6a}",math.mininteger)) == math.mininteger))
125−assert((unpack("\u{3c}\u{4a}",pack("\u{3c}\u{6a}",- 0x1)) == - 0x1))
125+assert((unpack("\u{3c}\u{4a}",pack("\u{3c}\u{6a}",(- 0x1))) == (- 0x1)))
126if little then
126if little then
127assert((pack("\u{66}",0x18) == pack("\u{3c}\u{66}",0x18)))
127assert((pack("\u{66}",0x18) == pack("\u{3c}\u{66}",0x18)))
128else
128else
129assert((pack("\u{66}",0x18) == pack("\u{3e}\u{66}",0x18)))
129assert((pack("\u{66}",0x18) == pack("\u{3e}\u{66}",0x18)))
130end
130end
131print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{2d}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{73}")
131print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{2d}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{73}")
132−for _,n in ipairs({0x0,- 1.1,1.9,(0x1 / 0x0),- (0x1 / 0x0),1e20,- 1e20,0.1,2000.7})
132+for _,n in ipairs({0x0,(- 1.1),1.9,(0x1 / 0x0),(- (0x1 / 0x0)),1e20,(- 1e20),0.1,2000.7})
133do
133do
134assert((unpack("\u{6e}",pack("\u{6e}",n)) == n))
134assert((unpack("\u{6e}",pack("\u{6e}",n)) == n))
135assert((unpack("\u{3c}\u{6e}",pack("\u{3c}\u{6e}",n)) == n))
135assert((unpack("\u{3c}\u{6e}",pack("\u{3c}\u{6e}",n)) == n))
@@ -137,7 +137,7 @@ assert((unpack("\u{3e}\u{6e}",pack("\u{3e}\u{6e}",n)) == n))
137assert((pack("\u{3c}\u{66}",n) == pack("\u{3e}\u{66}",n):reverse()))
137assert((pack("\u{3c}\u{66}",n) == pack("\u{3e}\u{66}",n):reverse()))
138assert((pack("\u{3e}\u{64}",n) == pack("\u{3c}\u{64}",n):reverse()))
138assert((pack("\u{3e}\u{64}",n) == pack("\u{3c}\u{64}",n):reverse()))
139end
139end
140−for _,n in ipairs({0x0,- 1.5,(0x1 / 0x0),- (0x1 / 0x0),1e10,- 1e9,0.5,2000.25})
140+for _,n in ipairs({0x0,(- 1.5),(0x1 / 0x0),(- (0x1 / 0x0)),1e10,(- 1e9),0.5,2000.25})
141do
141do
142assert((unpack("\u{3c}\u{66}",pack("\u{3c}\u{66}",n)) == n))
142assert((unpack("\u{3c}\u{66}",pack("\u{3c}\u{66}",n)) == n))
143assert((unpack("\u{3e}\u{66}",pack("\u{3e}\u{66}",n)) == n))
143assert((unpack("\u{3e}\u{66}",pack("\u{3e}\u{66}",n)) == n))
@@ -159,12 +159,12 @@ checkerror("\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u
159for i = 0x2, NB
159for i = 0x2, NB
160do
160do
161local s1 = pack(("\u{73}" .. i),s)
161local s1 = pack(("\u{73}" .. i),s)
162−assert(((unpack(("\u{73}" .. i),s1) == s) and # (s1 == # (s + i))))
162+assert(((unpack(("\u{73}" .. i),s1) == s) and (# (s1 == (# (s + i))))))
163end
163end
164end
164end
165do
165do
166local x = pack("\u{73}","\u{61}\u{6c}\u{6f}")
166local x = pack("\u{73}","\u{61}\u{6c}\u{6f}")
167−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{73}",x:sub(0x1,- 0x2))
167+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{73}",x:sub(0x1,(- 0x2)))
168checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{63}\u{35}","\u{61}\u{62}\u{63}\u{64}")
168checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{63}\u{35}","\u{61}\u{62}\u{63}\u{64}")
169checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,"\u{73}\u{31}\u{30}\u{30}","\u{61}\u{6c}\u{6f}")
169checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,"\u{73}\u{31}\u{30}\u{30}","\u{61}\u{6c}\u{6f}")
170end
170end
@@ -186,18 +186,18 @@ checkerror("\u{6c}\u{6f}\u{6e}\u{67}\u{65}\u{72}\u{20}\u{74}\u{68}\u{61}\u{6e}",
186end
186end
187do
187do
188local x = pack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8)
188local x = pack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8)
189−assert(# (x == packsize("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}")))
189+assert((# (x == packsize("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}"))))
190local a,b,c,d,e,f,g,h = unpack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",x)
190local a,b,c,d,e,f,g,h = unpack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",x)
191assert(((((((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == 0x4)) and (e == 0x5)) and (f == 0x6)) and (g == 0x7)) and (h == 0x8)))
191assert(((((((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == 0x4)) and (e == 0x5)) and (f == 0x6)) and (g == 0x7)) and (h == 0x8)))
192end
192end
193print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}")
193print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}")
194do
194do
195assert((pack("\u{20}\u{3c}\u{20}\u{69}\u{31}\u{20}\u{69}\u{32}\u{20}",0x2,0x3) == "\u{2}\u{3}\u{0}"))
195assert((pack("\u{20}\u{3c}\u{20}\u{69}\u{31}\u{20}\u{69}\u{32}\u{20}",0x2,0x3) == "\u{2}\u{3}\u{0}"))
196−local x = pack("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}",- 0xc,0x64,0xc8,"\u{ec}")
196+local x = pack("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}",(- 0xc),0x64,0xc8,"\u{ec}")
197−assert(# (x == packsize("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}")))
197+assert((# (x == packsize("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}"))))
198assert((x == ("\u{f4}" .. ("\u{0}\u{0}\u{0}" .. ("\u{0}\u{0}\u{0}\u{64}" .. ("\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{c8}" .. ("\u{ec}" .. "\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}")))))))
198assert((x == ("\u{f4}" .. ("\u{0}\u{0}\u{0}" .. ("\u{0}\u{0}\u{0}\u{64}" .. ("\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{c8}" .. ("\u{ec}" .. "\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}")))))))
199local a,b,c,d,pos = unpack("\u{3e}\u{21}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{62}\u{20}\u{58}\u{69}\u{38}\u{20}\u{58}\u{49}\u{20}\u{58}\u{48}",x)
199local a,b,c,d,pos = unpack("\u{3e}\u{21}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{62}\u{20}\u{58}\u{69}\u{38}\u{20}\u{58}\u{49}\u{20}\u{58}\u{48}",x)
200−assert(((((a == "\u{f4}") and (b == 0x64)) and (c == 0xc8)) and (d == - (0x14 and ((pos - 0x1) == # x)))))
200+assert(((((a == "\u{f4}") and (b == 0x64)) and (c == 0xc8)) and (d == (- (0x14 and ((pos - 0x1) == (# x)))))))
201x=pack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{69}\u{34}","\u{61}\u{62}\u{63}","\u{61}\u{62}\u{63}\u{64}","\u{78}\u{7a}","\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x5,"\u{77}\u{6f}\u{72}\u{6c}\u{64}","\u{78}\u{79}")
201x=pack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{69}\u{34}","\u{61}\u{62}\u{63}","\u{61}\u{62}\u{63}\u{64}","\u{78}\u{7a}","\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x5,"\u{77}\u{6f}\u{72}\u{6c}\u{64}","\u{78}\u{79}")
202assert((x == "\u{61}\u{62}\u{63}\u{61}\u{62}\u{63}\u{64}\u{78}\u{7a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{5}\u{77}\u{6f}\u{72}\u{6c}\u{64}\u{78}\u{79}\u{0}"))
202assert((x == "\u{61}\u{62}\u{63}\u{61}\u{62}\u{63}\u{64}\u{78}\u{7a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{5}\u{77}\u{6f}\u{72}\u{6c}\u{64}\u{78}\u{79}\u{0}"))
203local a,b,c,d,e,f,g,pos = unpack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{68}\u{20}\u{58}\u{69}\u{34}",x)
203local a,b,c,d,e,f,g,pos = unpack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{68}\u{20}\u{58}\u{69}\u{34}",x)
@@ -206,7 +206,7 @@ x=pack("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}
206assert((packsize("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}") == 0x4))
206assert((packsize("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}") == 0x4))
207assert((x == "\u{1}\u{2}\u{3}\u{0}"))
207assert((x == "\u{1}\u{2}\u{3}\u{0}"))
208a,b,c,pos=unpack("\u{62}\u{62}\u{58}\u{64}\u{62}",x)
208a,b,c,pos=unpack("\u{62}\u{62}\u{58}\u{64}\u{62}",x)
209−assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (pos == # x)))
209+assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (pos == (# x))))
210assert((packsize("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}") == 0x8))
210assert((packsize("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}") == 0x8))
211local pos = unpack("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
211local pos = unpack("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
212;
212;
@@ -244,16 +244,16 @@ do
244local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(pos + 0x1))
244local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(pos + 0x1))
245assert(((i == (((pos + 0x3) // 0x4) + 0x1)) and (p == ((i * 0x4) + 0x1))))
245assert(((i == (((pos + 0x3) // 0x4) + 0x1)) and (p == ((i * 0x4) + 0x1))))
246end
246end
247−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- 0x4)
247+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x4))
248assert(((i == 0x4) and (p == 0x11)))
248assert(((i == 0x4) and (p == 0x11)))
249−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- 0x7)
249+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x7))
250assert(((i == 0x4) and (p == 0x11)))
250assert(((i == 0x4) and (p == 0x11)))
251−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- # x)
251+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- (# x)))
252assert(((i == 0x1) and (p == 0x5)))
252assert(((i == 0x1) and (p == 0x5)))
253−for i = 0x1, # (x + 0x1)
253+for i = 0x1, (# (x + 0x1))
254do
254do
255assert((unpack("\u{63}\u{30}",x,i) == ""))
255assert((unpack("\u{63}\u{30}",x,i) == ""))
256end
256end
257−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{63}\u{30}",x,# (x + 0x2))
257+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{63}\u{30}",x,(# (x + 0x2)))
258end
258end
259print("\u{4f}\u{4b}")
259print("\u{4f}\u{4b}")
desk/res/lua/cycled/tracegc.lua+1−1
@@ -10,7 +10,7 @@ setmetatable(o,mt)
10end
10end
11end
11end
12function M.start()
12function M.start()
13−if not active then
13+if (not active) then
14active=true
14active=true
15setmetatable({},mt)
15setmetatable({},mt)
16end
16end
desk/res/lua/cycled/utf8.lua+39−39
@@ -3,36 +3,36 @@ local utf8 = require("\u{75}\u{74}\u{66}\u{38}")
3local function checkerror
3local function checkerror
4(msg,f, ...)
4(msg,f, ...)
5local s,err = pcall(f,...)
5local s,err = pcall(f,...)
6−assert(not (s and string.find(err,msg)))
6+assert((not (s and string.find(err,msg))))
7end
7end
8local function len
8local function len
9(s)
9(s)
10−return # string.gsub(s,"\u{5b}\u{80}\u{2d}\u{bf}\u{5d}","")
10+return (# string.gsub(s,"\u{5b}\u{80}\u{2d}\u{bf}\u{5d}",""))
11end
11end
12local justone = ("\u{5e}" .. (utf8.charpattern .. "\u{24}"))
12local justone = ("\u{5e}" .. (utf8.charpattern .. "\u{24}"))
13local function checksyntax
13local function checksyntax
14(s,t)
14(s,t)
15local ts = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}"}
15local ts = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}"}
16−for i = 0x1, # t
16+for i = 0x1, (# t)
17do
17do
18ts[(i + 0x1)]=string.format("\u{5c}\u{75}\u{7b}\u{25}\u{78}\u{7d}",t[i])
18ts[(i + 0x1)]=string.format("\u{5c}\u{75}\u{7b}\u{25}\u{78}\u{7d}",t[i])
19end
19end
20−ts[# (t + 0x2)]="\u{27}"
20+ts[(# (t + 0x2))]="\u{27}"
21ts=table.concat(ts)
21ts=table.concat(ts)
22assert((assert(load(ts))() == s))
22assert((assert(load(ts))() == s))
23end
23end
24−assert(not utf8.offset("\u{61}\u{6c}\u{6f}",0x5))
24+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",0x5)))
25−assert(not utf8.offset("\u{61}\u{6c}\u{6f}",- 0x4))
25+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",(- 0x4))))
26local function check
26local function check
27(s,t,nonstrict)
27(s,t,nonstrict)
28−local l = utf8.len(s,0x1,- 0x1,nonstrict)
28+local l = utf8.len(s,0x1,(- 0x1),nonstrict)
29−assert(# ((t == l) and (len(s) == l)))
29+assert((# ((t == l) and (len(s) == l))))
30assert((utf8.char(table.unpack(t)) == s))
30assert((utf8.char(table.unpack(t)) == s))
31assert((utf8.offset(s,0x0) == 0x1))
31assert((utf8.offset(s,0x0) == 0x1))
32checksyntax(s,t)
32checksyntax(s,t)
33−local t1 = {utf8.codepoint(s,0x1,- 0x1,nonstrict)}
33+local t1 = {utf8.codepoint(s,0x1,(- 0x1),nonstrict)}
34−assert(# (t == # t1))
34+assert((# (t == (# t1))))
35−for i = 0x1, # t
35+for i = 0x1, (# t)
36do
36do
37assert((t[i] == t1[i]))
37assert((t[i] == t1[i]))
38end
38end
@@ -41,21 +41,21 @@ do
41local pi = utf8.offset(s,i)
41local pi = utf8.offset(s,i)
42local pi1 = utf8.offset(s,0x2,pi)
42local pi1 = utf8.offset(s,0x2,pi)
43assert(string.find(string.sub(s,pi,(pi1 - 0x1)),justone))
43assert(string.find(string.sub(s,pi,(pi1 - 0x1)),justone))
44−assert((utf8.offset(s,- 0x1,pi1) == pi))
44+assert((utf8.offset(s,(- 0x1),pi1) == pi))
45assert((utf8.offset(s,((i - l) - 0x1)) == pi))
45assert((utf8.offset(s,((i - l) - 0x1)) == pi))
46−assert(((pi1 - pi) == # utf8.char(utf8.codepoint(s,pi,pi,nonstrict))))
46+assert(((pi1 - pi) == (# utf8.char(utf8.codepoint(s,pi,pi,nonstrict)))))
47for j = pi, (pi1 - 0x1)
47for j = pi, (pi1 - 0x1)
48do
48do
49assert((utf8.offset(s,0x0,j) == pi))
49assert((utf8.offset(s,0x0,j) == pi))
50end
50end
51for j = (pi + 0x1), (pi1 - 0x1)
51for j = (pi + 0x1), (pi1 - 0x1)
52do
52do
53−assert(not utf8.len(s,j))
53+assert((not utf8.len(s,j)))
54end
54end
55assert((utf8.len(s,pi,pi,nonstrict) == 0x1))
55assert((utf8.len(s,pi,pi,nonstrict) == 0x1))
56assert((utf8.len(s,pi,(pi1 - 0x1),nonstrict) == 0x1))
56assert((utf8.len(s,pi,(pi1 - 0x1),nonstrict) == 0x1))
57−assert((utf8.len(s,pi,- 0x1,nonstrict) == ((l - i) + 0x1)))
57+assert((utf8.len(s,pi,(- 0x1),nonstrict) == ((l - i) + 0x1)))
58−assert((utf8.len(s,pi1,- 0x1,nonstrict) == (l - i)))
58+assert((utf8.len(s,pi1,(- 0x1),nonstrict) == (l - i)))
59assert((utf8.len(s,0x1,pi,nonstrict) == i))
59assert((utf8.len(s,0x1,pi,nonstrict) == i))
60end
60end
61local i = 0x0
61local i = 0x0
@@ -65,32 +65,32 @@ i=(i + 0x1)
65assert(((c == t[i]) and (p == utf8.offset(s,i))))
65assert(((c == t[i]) and (p == utf8.offset(s,i))))
66assert((utf8.codepoint(s,p,p,nonstrict) == c))
66assert((utf8.codepoint(s,p,p,nonstrict) == c))
67end
67end
68−assert((i == # t))
68+assert((i == (# t)))
69i=0x0
69i=0x0
70for c in string.gmatch(s,utf8.charpattern)
70for c in string.gmatch(s,utf8.charpattern)
71do
71do
72i=(i + 0x1)
72i=(i + 0x1)
73assert((c == utf8.char(t[i])))
73assert((c == utf8.char(t[i])))
74end
74end
75−assert((i == # t))
75+assert((i == (# t)))
76for i = 0x1, l
76for i = 0x1, l
77do
77do
78−assert((utf8.offset(s,i) == utf8.offset(s,((i - l) - 0x1),# (s + 0x1))))
78+assert((utf8.offset(s,i) == utf8.offset(s,((i - l) - 0x1),(# (s + 0x1)))))
79end
79end
80end
80end
81do
81do
82local function check
82local function check
83(s,p)
83(s,p)
84local a,b = utf8.len(s)
84local a,b = utf8.len(s)
85−assert(not (a and (b == p)))
85+assert((not (a and (b == p))))
86end
86end
87check("\u{61}\u{62}\u{63}\u{e3}\u{64}\u{65}\u{66}",0x4)
87check("\u{61}\u{62}\u{63}\u{e3}\u{64}\u{65}\u{66}",0x4)
88check("\u{f4}\u{9f}\u{bf}",0x1)
88check("\u{f4}\u{9f}\u{bf}",0x1)
89check("\u{f4}\u{9f}\u{bf}\u{bf}",0x1)
89check("\u{f4}\u{9f}\u{bf}\u{bf}",0x1)
90−check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{80}",# (("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}") + 0x1))
90+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{80}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
91check("\u{80}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
91check("\u{80}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
92check("\u{68}\u{65}\u{6c}\u{80}\u{6c}\u{6f}",0x4)
92check("\u{68}\u{65}\u{6c}\u{80}\u{6c}\u{6f}",0x4)
93−check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{bf}",# (("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}") + 0x1))
93+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{bf}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
94check("\u{bf}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
94check("\u{bf}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
95check("\u{68}\u{65}\u{6c}\u{bf}\u{6c}\u{6f}",0x4)
95check("\u{68}\u{65}\u{6c}\u{bf}\u{6c}\u{6f}",0x4)
96end
96end
@@ -111,20 +111,20 @@ errorcodes("\u{bf}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}")
111errorcodes("\u{ce}\u{b1}\u{ce}\u{bb}\u{cf}\u{86}\u{bf}\u{ce}\u{b1}")
111errorcodes("\u{ce}\u{b1}\u{ce}\u{bb}\u{cf}\u{86}\u{bf}\u{ce}\u{b1}")
112local f = utf8.codes("")
112local f = utf8.codes("")
113assert((f("",0x2) == nil))
113assert((f("",0x2) == nil))
114−assert((f("",- 0x1) == nil))
114+assert((f("",(- 0x1)) == nil))
115assert((f("",math.mininteger) == nil))
115assert((f("",math.mininteger) == nil))
116end
116end
117checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,0x5)
117checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,0x5)
118−checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,- 0x4)
118+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,(- 0x4))
119checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,0x2)
119checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,0x2)
120−checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,- 0x1)
120+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,(- 0x1))
121checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
121checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
122checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
122checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
123checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{80}",0x1)
123checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{80}",0x1)
124checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x0,0x2)
124checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x0,0x2)
125checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x1,0x4)
125checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x1,0x4)
126local s = "\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{57}\u{6f}\u{72}\u{6c}\u{64}"
126local s = "\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{57}\u{6f}\u{72}\u{6c}\u{64}"
127−local t = {string.byte(s,0x1,- 0x1)}
127+local t = {string.byte(s,0x1,(- 0x1))}
128for i = 0x1, utf8.len(s)
128for i = 0x1, utf8.len(s)
129do
129do
130assert((t[i] == string.byte(s,i)))
130assert((t[i] == string.byte(s,i)))
@@ -133,14 +133,14 @@ check(s,t)
133check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{2f}\u{e6}\u{bc}\u{a2}\u{e5}\u{ad}\u{97}",{0x6c49,0x5b57,0x2f,0x6f22,0x5b57})
133check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{2f}\u{e6}\u{bc}\u{a2}\u{e5}\u{ad}\u{97}",{0x6c49,0x5b57,0x2f,0x6f22,0x5b57})
134do
134do
135local s = "\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}\u{80}"
135local s = "\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}\u{80}"
136−local t = {utf8.codepoint(s,0x1,# (s - 0x1))}
136+local t = {utf8.codepoint(s,0x1,(# (s - 0x1)))}
137−assert(# ((((t == 0x3) and (t[0x1] == 0xe1)) and (t[0x2] == 0xe9)) and (t[0x3] == 0xed)))
137+assert((# ((((t == 0x3) and (t[0x1] == 0xe1)) and (t[0x2] == 0xe9)) and (t[0x3] == 0xed))))
138−checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s,0x1,# s)
138+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s,0x1,(# s))
139−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,# (s + 0x1))
139+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(# (s + 0x1)))
140t={utf8.codepoint(s,0x4,0x3)}
140t={utf8.codepoint(s,0x4,0x3)}
141−assert(# (t == 0x0))
141+assert((# (t == 0x0)))
142−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,- (# (s + 0x1)),0x1)
142+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(- (# (s + 0x1))),0x1)
143−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,0x1,# (s + 0x1))
143+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,0x1,(# (s + 0x1)))
144assert((utf8.codepoint("\u{d7ff}") == (0xd800 - 0x1)))
144assert((utf8.codepoint("\u{d7ff}") == (0xd800 - 0x1)))
145assert((utf8.codepoint("\u{e000}") == (0xdfff + 0x1)))
145assert((utf8.codepoint("\u{e000}") == (0xdfff + 0x1)))
146assert((utf8.codepoint("\u{d800}",0x1,0x1,true) == 0xd800))
146assert((utf8.codepoint("\u{d800}",0x1,0x1,true) == 0xd800))
@@ -152,11 +152,11 @@ assert((utf8.char(0x0,0x61,0x62,0x63,0x1) == "\u{0}\u{61}\u{62}\u{63}\u{1}"))
152assert((utf8.codepoint(utf8.char(0x10ffff)) == 0x10ffff))
152assert((utf8.codepoint(utf8.char(0x10ffff)) == 0x10ffff))
153assert((utf8.codepoint(utf8.char(0x7fffffff),0x1,0x1,true) == ((0x1 << 0x1f) - 0x1)))
153assert((utf8.codepoint(utf8.char(0x7fffffff),0x1,0x1,true) == ((0x1 << 0x1f) - 0x1)))
154checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(0x7fffffff + 0x1))
154checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(0x7fffffff + 0x1))
155−checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,- 0x1)
155+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(- 0x1))
156local function invalid
156local function invalid
157(s)
157(s)
158checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s)
158checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s)
159−assert(not utf8.len(s))
159+assert((not utf8.len(s)))
160end
160end
161invalid("\u{f4}\u{9f}\u{bf}\u{bf}")
161invalid("\u{f4}\u{9f}\u{bf}\u{bf}")
162invalid("\u{d800}")
162invalid("\u{d800}")
@@ -175,13 +175,13 @@ s=string.gsub(s,"\u{20}","")
175check(s,{0x0,0x7f,0x80,0x7ff,0x800,0xffff,0x10000,0x10ffff})
175check(s,{0x0,0x7f,0x80,0x7ff,0x800,0xffff,0x10000,0x10ffff})
176do
176do
177local s = "\u{4000000}\u{7fffffff}"
177local s = "\u{4000000}\u{7fffffff}"
178−assert(# (s == 0xc))
178+assert((# (s == 0xc)))
179check(s,{0x4000000,0x7fffffff},true)
179check(s,{0x4000000,0x7fffffff},true)
180s="\u{200000}\u{3ffffff}"
180s="\u{200000}\u{3ffffff}"
181−assert(# (s == 0xa))
181+assert((# (s == 0xa)))
182check(s,{0x200000,0x3ffffff},true)
182check(s,{0x200000,0x3ffffff},true)
183s="\u{10000}\u{1fffff}"
183s="\u{10000}\u{1fffff}"
184−assert(# (s == 0x8))
184+assert((# (s == 0x8)))
185check(s,{0x10000,0x1fffff},true)
185check(s,{0x10000,0x1fffff},true)
186end
186end
187local x = "\u{e6}\u{97}\u{a5}\u{e6}\u{9c}\u{ac}\u{e8}\u{aa}\u{9e}\u{61}\u{2d}\u{34}\u{0}\u{c3}\u{a9}\u{c3}\u{b3}"
187local x = "\u{e6}\u{97}\u{a5}\u{e6}\u{9c}\u{ac}\u{e8}\u{aa}\u{9e}\u{61}\u{2d}\u{34}\u{0}\u{c3}\u{a9}\u{c3}\u{b3}"
@@ -195,7 +195,7 @@ i=(i + 0x1)
195assert((utf8.offset(x,i) == p))
195assert((utf8.offset(x,i) == p))
196assert((utf8.len(x,p) == ((utf8.len(x) - i) + 0x1)))
196assert((utf8.len(x,p) == ((utf8.len(x) - i) + 0x1)))
197assert((utf8.len(c) == 0x1))
197assert((utf8.len(c) == 0x1))
198−for j = 0x1, # (c - 0x1)
198+for j = 0x1, (# (c - 0x1))
199do
199do
200assert((utf8.offset(x,0x0,((p + j) - 0x1)) == p))
200assert((utf8.offset(x,0x0,((p + j) - 0x1)) == p))
201end
201end
desk/res/lua/cycled/vararg.lua+8−8
@@ -13,7 +13,7 @@ local function c12
13assert((arg == _G.arg))
13assert((arg == _G.arg))
14local x = {...}
14local x = {...}
15;
15;
16−x.n=# x
16+x.n=(# x)
17local res = (((x.n == 0x2) and (x[0x1] == 0x1)) and (x[0x2] == 0x2))
17local res = (((x.n == 0x2) and (x[0x1] == 0x1)) and (x[0x2] == 0x2))
18if res then
18if res then
19res=0x37
19res=0x37
@@ -38,7 +38,7 @@ assert(((a == 0x37) and (b == 0x2)))
38a=call(c12,{0x1,0x2,["\u{6e}"] = 0x2})
38a=call(c12,{0x1,0x2,["\u{6e}"] = 0x2})
39assert(((a == 0x37) and (b == 0x2)))
39assert(((a == 0x37) and (b == 0x2)))
40a=call(c12,{0x1,0x2,["\u{6e}"] = 0x1})
40a=call(c12,{0x1,0x2,["\u{6e}"] = 0x1})
41−assert(not a)
41+assert((not a))
42assert((c12(0x1,0x2,0x3) == false))
42assert((c12(0x1,0x2,0x3) == false))
43local a = vararg(call(next,{_G,nil,["\u{6e}"] = 0x2}))
43local a = vararg(call(next,{_G,nil,["\u{6e}"] = 0x2}))
44local b,c = next(_G)
44local b,c = next(_G)
@@ -51,7 +51,7 @@ local t = {0x1,0xa}
51function t:f(...)
51function t:f(...)
52local arg = {...}
52local arg = {...}
53;
53;
54−return (self[...] + # arg)
54+return (self[...] + (# arg))
55end
55end
56assert(((t:f(0x1,0x4) == 0x3) and (t:f(0x2) == 0xb)))
56assert(((t:f(0x1,0x4) == 0x3) and (t:f(0x2) == 0xb)))
57print("\u{2b}")
57print("\u{2b}")
@@ -64,7 +64,7 @@ i=(i + 0x1)
64end
64end
65function f(a,b,c,d, ...)
65function f(a,b,c,d, ...)
66local more = {...}
66local more = {...}
67−assert(((((a == 1.3) and (more[0x1] == 5.3)) and (more[(lim - 0x4)] == (lim + 0.3))) and not more[(lim - 0x3)]))
67+assert(((((a == 1.3) and (more[0x1] == 5.3)) and (more[(lim - 0x4)] == (lim + 0.3))) and (not more[(lim - 0x3)])))
68end
68end
69local function g
69local function g
70(a,b,c)
70(a,b,c)
@@ -108,15 +108,15 @@ f=load("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}
108assert(f("\u{61}","\u{62}",nil,{},assert))
108assert(f("\u{61}","\u{62}",nil,{},assert))
109assert(f())
109assert(f())
110a={select(0x3,table.unpack({0xa,0x14,0x1e,0x28}))}
110a={select(0x3,table.unpack({0xa,0x14,0x1e,0x28}))}
111−assert(# (((a == 0x2) and (a[0x1] == 0x1e)) and (a[0x2] == 0x28)))
111+assert((# (((a == 0x2) and (a[0x1] == 0x1e)) and (a[0x2] == 0x28))))
112a={select(0x1)}
112a={select(0x1)}
113assert((next(a) == nil))
113assert((next(a) == nil))
114−a={select(- 0x1,0x3,0x5,0x7)}
114+a={select((- 0x1),0x3,0x5,0x7)}
115assert(((a[0x1] == 0x7) and (a[0x2] == undef)))
115assert(((a[0x1] == 0x7) and (a[0x2] == undef)))
116−a={select(- 0x2,0x3,0x5,0x7)}
116+a={select((- 0x2),0x3,0x5,0x7)}
117assert((((a[0x1] == 0x5) and (a[0x2] == 0x7)) and (a[0x3] == undef)))
117assert((((a[0x1] == 0x5) and (a[0x2] == 0x7)) and (a[0x3] == undef)))
118pcall(select,0x2710)
118pcall(select,0x2710)
119−pcall(select,- 0x2710)
119+pcall(select,(- 0x2710))
120function f(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p48,p49,p50, ...)
120function f(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p48,p49,p50, ...)
121local a1,a2,a3,a4,a5,a6,a7
121local a1,a2,a3,a4,a5,a6,a7
122local a8,a9,a10,a11,a12,a13,a14
122local a8,a9,a10,a11,a12,a13,a14
desk/res/lua/cycled/verybig.lua+1−1
@@ -46,7 +46,7 @@ io.output(file)
46for s in string.gmatch(prog,"\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2b}\u{29}")
46for s in string.gmatch(prog,"\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2b}\u{29}")
47do
47do
48local n = tonumber(s)
48local n = tonumber(s)
49−if not n then
49+if (not n) then
50io.write(s)
50io.write(s)
51else
51else
52F[n]()
52F[n]()