Unnamed Fossil Project

Check-in [9d774c8178]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Budeme mit testy.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9d774c8178bc10be8517ddd35b3a4331a1813da8
User & Date: Yasha 2014-04-21 16:07:59
Context
2014-04-21
17:33
Vylepsen XMLCodec. Leaf check-in: 4481b65d54 user: Yasha tags: trunk
16:07
Budeme mit testy. check-in: 9d774c8178 user: Yasha tags: trunk
15:54
Pridany dalsi casti. check-in: 55525ed0a6 user: Yasha tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added runtest.bat.









>
>
>
>
1
2
3
4
@echo off
SET svidir=%~dp0
SET LUA_PATH=%svidir%lib\?.lua;;
%svidir%bin\lua52 %svidir%\tests\%1.lua

Added tests/xmlcodec.lua.































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local codec = require "xmlcodec"

local foo = codec.parse[[
<foo><bar baz="foo"/>baz</foo>
]]

assert(foo[0]=="foo")
assert(type(foo[1])=="table")
assert(type(foo[2])=="string")
assert(foo[2]=="baz")
assert(foo[1][0]=="bar")
assert(foo[1]['baz']=="foo")


print "OK"