Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test log opened
- platform: a800 100c
- version: CHDK 1.1.0 built on Mar 17 2012 12:34:44
- os: dryos platformid: 12838
- ***test io***
- file info for io.input: closed file!
- file info for io.output: valid file
- ptr: 2115800 fd: 3 len: 214 pos: 214
- raw vals: 0:3 4:214 8:1 12:214 16:1 20:1 24:270636512 28:0 32:1819029313
- io.open("A/iotest0.txt","w+b"): OK PASS
- A/iotest0.txt:write(...): OK PASS
- A/iotest0.txt:seek("set",4): OK 4 PASS
- A/iotest0.txt:read(5): string [slick]
- A/iotest0.txt:seek("nil",nil): OK 9 PASS
- A/iotest0.txt:seek("cur",-5): OK 4 PASS
- A/iotest0.txt:write(...): OK PASS
- A/iotest0.txt:seek("end",nil): OK 44 PASS
- A/iotest0.txt:write(...): OK PASS
- A/iotest0.txt:flush(): OK PASS
- A/iotest0.txt:seek("set",nil): OK 0 PASS
- test file:lines()
- 0: [the quick brown fox jumps over the lazy dog]
- 1: [1]
- 2: [2a 3 1234567890 b]
- A/iotest0.txt:seek("set",nil): OK 0 PASS
- A/iotest0.txt:write(...): OK PASS
- A/iotest0.txt:seek("set",nil): OK 0 PASS
- test file:read("*a")
- A/iotest0.txt:read(*a): string [
- 1
- 2a 3 1234567890 b]
- A/iotest0.txt:seek("set",nil): OK 0 PASS
- testing file:read("*n")
- A/iotest0.txt:read(*n): number [1]
- A/iotest0.txt:seek("nil",nil): OK 45 NA
- A/iotest0.txt:read(*n): number [2]
- A/iotest0.txt:seek("nil",nil): OK 47 NA
- A/iotest0.txt:read(*n): <no results>
- A/iotest0.txt:seek("nil",nil): OK 47 NA
- A/iotest0.txt:read(1): string [a]
- A/iotest0.txt:seek("nil",nil): OK 48 NA
- A/iotest0.txt:read(*n): number [3]
- A/iotest0.txt:seek("nil",nil): OK 52 NA
- A/iotest0.txt:read(*n): number [1234567890]
- A/iotest0.txt:seek("nil",nil): OK 63 NA
- A/iotest0.txt:read(*n): <no results>
- A/iotest0.txt:seek("nil",nil): OK 70 NA
- A/iotest0.txt:read(1): string [b]
- A/iotest0.txt:seek("nil",nil): OK 71 NA
- A/iotest0.txt:read(*n): <no results>
- A/iotest0.txt:seek("nil",nil): OK 71 NA
- A/iotest0.txt:read(1): <no results>
- A/iotest0.txt:seek("nil",nil): OK 71 NA
- A/iotest0.txt:close(): OK PASS
- test open missing file
- io.open("A/bogus","r"): ERR msg=A/bogus: error PASS
- test open dir
- io.open("A/CHDK","r"): ERR msg=A/CHDK: error PASS
- io.open("A/iotest0.txt","r"): OK PASS
- test invalid seeks
- A/iotest0.txt:seek("set",-1): ERR nil PASS
- A/iotest0.txt:seek("end",100): ERR nil PASS
- A/iotest0.txt:close(): OK PASS
- ***end io OK***
- ***test os***
- current date Sat Mar 17 13:58:43 2012
- os.time(): OK 1331992723 PASS
- os.time({day=1,year=1980,month=1,}): OK 315576000 PASS
- os.time({day=1,year=1066,month=1,}): ERR PASS
- %a [Sat]
- %A [Saturday]
- %b [Mar]
- %B [March]
- %c [Sat Mar 17 13:58:43 2012]
- %d [17]
- %H [13]
- %I [01]
- %j [077]
- %m [03]
- %M [58]
- %p [PM]
- %S [43]
- %U [11]
- %w [6]
- %W [11]
- %x [03/17/12]
- %X [13:58:43]
- %y [12]
- %Y [2012]
- %Z [%Z]
- %% [%]
- os.mkdir("A/MDTST0"): OK PASS
- io.open("A/MDTST0/TEST0.DAT","wb"): OK PASS
- A/MDTST0/TEST0.DAT:write(...): OK PASS
- A/MDTST0/TEST0.DAT:close(): OK PASS
- os.stat("A/MDTST0/TEST0.DAT"): OK PASS
- {
- dev=nil
- mode=nil
- size=4
- atime=nil
- mtime=1331992722
- ctime=1331992722
- blksize=nil
- blocks=nil
- attrib=32
- is_dir=false
- is_file=true
- }
- os.utime("A/MDTST0/TEST0.DAT",nil,nil): OK PASS
- os.stat("A/MDTST0/TEST0.DAT"): OK PASS
- {
- dev=nil
- mode=nil
- size=4
- atime=nil
- mtime=1331992724
- ctime=1331992722
- blksize=nil
- blocks=nil
- attrib=32
- is_dir=false
- is_file=true
- }
- os.utime("A/MDTST0/TEST0.DAT",441763200,472780800): OK PASS
- os.stat("A/MDTST0/TEST0.DAT"): OK PASS
- {
- dev=nil
- mode=nil
- size=4
- atime=nil
- mtime=441763200
- ctime=1331992722
- blksize=nil
- blocks=nil
- attrib=32
- is_dir=false
- is_file=true
- }
- os.stat("A/MDTST0"): OK PASS
- {
- dev=nil
- mode=nil
- size=0
- atime=nil
- mtime=1331992722
- ctime=1331992722
- blksize=nil
- blocks=nil
- attrib=16
- is_dir=true
- is_file=false
- }
- os.rename("A/MDTST0/TEST0.DAT","A/MDTST0/TEST1.DAT): OK PASS
- os.listdir("A/MDTST0",nil): OK PASS
- {
- 1="TEST1.DAT"
- }
- os.listdir("A/MDTST0",true): OK PASS
- {
- 1="."
- 2=".."
- 3="TEST1.DAT"
- }
- os.remove("A/MDTST0): ERR A/MDTST0: error PASS
- os.remove("A/bogus): ERR A/bogus: error PASS
- os.listdir("A/bogus",nil): ERR A/bogus: error PASS
- os.listdir("A/llibtst.log",nil): OK NA
- {
- }
- os.stat("A/bogus"): ERR A/bogus: error PASS
- os.utime("A/bogus",nil,nil): ERR A/bogus: error PASS
- os.rename("A/bogus","A/blah): ERR A/bogus: error PASS
- os.mkdir("A/CHDK"): ERR A/CHDK: error PASS
- os.remove("A/MDTST0/TEST1.DAT): OK PASS
- os.remove("A/MDTST0): OK PASS
- os.remove("A/iotest0.txt): OK NA
- ***end os OK***
- ***test string***
- string.byte("test",2): OK 101 PASS
- string.char(116,101,115,116): OK test PASS
- dump/load: OK test123 PASS
- string.find("test 1 2 3F!?","t%s(%d) 2 (%x%x%p%p)$"): OK 4 13 1 3F!? PASS
- string.format("%c %d %x %s",100,100,100,"test"): OK d 100 64 test PASS
- string.len("\000test"): OK 5 PASS
- string.lower("TESTtest"): OK testtest PASS
- string.upper("TESTtest"): OK TESTTEST PASS
- string.rep("test",2): OK testtest PASS
- string.reverse("123"): OK 321 PASS
- string.sub("test",-3): OK est PASS
- ***end string OK***
- close test log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement