mirror of
https://github.com/neumond/python-computer-craft.git
synced 2024-05-20 08:03:57 -04:00
Update tests
This commit is contained in:
parent
183f94ceac
commit
1fbe1d955d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ __pypackages__/
|
|||
/*.egg-info/
|
||||
/dist/
|
||||
/todo.txt
|
||||
/copy_programs.fish
|
||||
|
|
30
tests/TDESC.md
Normal file
30
tests/TDESC.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
`wget http://127.0.0.1:8000 py`
|
||||
|
||||
# replterm
|
||||
|
||||
`py`
|
||||
|
||||
```py
|
||||
>>> 'wщ' * 3
|
||||
'wщwщwщ'
|
||||
>>> (ctrl+C)
|
||||
interrupted
|
||||
```
|
||||
|
||||
# repl2p2
|
||||
|
||||
`py`
|
||||
|
||||
```py
|
||||
>>> 2+2
|
||||
4
|
||||
>>> (ctrl+D)
|
||||
```
|
||||
|
||||
# helloworld
|
||||
|
||||
`py helloworld.py 42 abc`
|
||||
|
||||
# computer
|
||||
|
||||
`py computer.py`
|
|
@ -1,6 +1,3 @@
|
|||
`py oc_computer.py`
|
||||
|
||||
```py
|
||||
from oc import computer
|
||||
|
||||
print(computer.address())
|
||||
|
@ -12,4 +9,3 @@ print(computer.maxEnergy())
|
|||
print(computer.uptime())
|
||||
print(computer.getBootAddress())
|
||||
print(computer.runlevel())
|
||||
```
|
|
@ -1,8 +1,4 @@
|
|||
`py helloworld.py 42 abc`
|
||||
|
||||
```py
|
||||
print(args)
|
||||
for _ in range(2):
|
||||
print("Hello world!")
|
||||
print("Hello world!")
|
||||
print("Привет мир!")
|
||||
```
|
|
@ -1,4 +1,4 @@
|
|||
R334:0[4]{:[1]<14>oc_computer.py}<20>/home/oc_computer.py<277>from oc import computer
|
||||
R328:0[5]{:[1]<11>computer.py}<17>/home/computer.py<277>from oc import computer
|
||||
|
||||
print(computer.address())
|
||||
print(computer.tmpAddress())
|
||||
|
@ -10,63 +10,63 @@ print(computer.uptime())
|
|||
print(computer.getBootAddress())
|
||||
print(computer.runlevel())
|
||||
|
||||
S29:T<1>1<18>R:computer.address{}
|
||||
R60:T<1>1<51>{:[1]T:[2]<36>be1fa9eb-9515-4f6f-80bc-13413ba71c37}
|
||||
S68:T<1>1<13>io.write(...){:[1]<36>be1fa9eb-9515-4f6f-80bc-13413ba71c37}
|
||||
S31:T<1>1<20>R:computer:M:address{}
|
||||
R60:T<1>1<51>{:[1]T:[2]<36>021442c9-1bb5-4037-95fc-6cafc9733b7d}
|
||||
S68:T<1>1<13>io.write(...){:[1]<36>021442c9-1bb5-4037-95fc-6cafc9733b7d}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<21>R:computer.tmpAddress{}
|
||||
R60:T<1>1<51>{:[1]T:[2]<36>7f99fbad-7243-4f4e-b6e7-542ed3b61fc5}
|
||||
S68:T<1>1<13>io.write(...){:[1]<36>7f99fbad-7243-4f4e-b6e7-542ed3b61fc5}
|
||||
S34:T<1>1<23>R:computer:M:tmpAddress{}
|
||||
R60:T<1>1<51>{:[1]T:[2]<36>9ad13475-5e59-4801-a461-03d8450b8dcb}
|
||||
S68:T<1>1<13>io.write(...){:[1]<36>9ad13475-5e59-4801-a461-03d8450b8dcb}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<21>R:computer.freeMemory{}
|
||||
R29:T<1>1<20>{:[1]T:[2][1840030]}
|
||||
S38:T<1>1<13>io.write(...){:[1]<7>1840030}
|
||||
S34:T<1>1<23>R:computer:M:freeMemory{}
|
||||
R29:T<1>1<20>{:[1]T:[2][1823136]}
|
||||
S38:T<1>1<13>io.write(...){:[1]<7>1823136}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S33:T<1>1<22>R:computer.totalMemory{}
|
||||
S35:T<1>1<24>R:computer:M:totalMemory{}
|
||||
R29:T<1>1<20>{:[1]T:[2][2097152]}
|
||||
S38:T<1>1<13>io.write(...){:[1]<7>2097152}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S28:T<1>1<17>R:computer.energy{}
|
||||
R29:T<1>1<20>{:[1]T:[2][20497.5]}
|
||||
S38:T<1>1<13>io.write(...){:[1]<7>20497.5}
|
||||
S30:T<1>1<19>R:computer:M:energy{}
|
||||
R34:T<1>1<25>{:[1]T:[2][20497.241875]}
|
||||
S44:T<1>1<13>io.write(...){:[1]<12>20497.241875}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S31:T<1>1<20>R:computer.maxEnergy{}
|
||||
S33:T<1>1<22>R:computer:M:maxEnergy{}
|
||||
R29:T<1>1<20>{:[1]T:[2][20500.0]}
|
||||
S36:T<1>1<13>io.write(...){:[1]<5>20500}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S28:T<1>1<17>R:computer.uptime{}
|
||||
R27:T<1>1<18>{:[1]T:[2][105.0]}
|
||||
S34:T<1>1<13>io.write(...){:[1]<3>105}
|
||||
S30:T<1>1<19>R:computer:M:uptime{}
|
||||
R27:T<1>1<18>{:[1]T:[2][283.8]}
|
||||
S36:T<1>1<13>io.write(...){:[1]<5>283.8}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S36:T<1>1<25>R:computer.getBootAddress{}
|
||||
S38:T<1>1<27>R:computer:M:getBootAddress{}
|
||||
R60:T<1>1<51>{:[1]T:[2]<36>bfa2ec7b-fcd9-46bd-b5f0-50836c23757f}
|
||||
S68:T<1>1<13>io.write(...){:[1]<36>bfa2ec7b-fcd9-46bd-b5f0-50836c23757f}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S30:T<1>1<19>R:computer.runlevel{}
|
||||
S32:T<1>1<21>R:computer:M:runlevel{}
|
||||
R23:T<1>1<14>{:[1]T:[2][1]}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>1}
|
||||
R15:T<1>1<7>{:[1]T}
|
|
@ -1,7 +1,8 @@
|
|||
R157:0[4]{:[1]<13>helloworld.py:[2]<2>42:[3]<3>abc}<19>/home/helloworld.py<84>print(args)
|
||||
R160:0[5]{:[1]<13>helloworld.py:[2]<2>42:[3]<3>abc}<19>/home/helloworld.py<87>print(args)
|
||||
for _ in range(2):
|
||||
print("Hello world!")
|
||||
print("Hello world!")
|
||||
print("Привет мир!")
|
||||
|
||||
S65:T<1>1<13>io.write(...){:[1]<33>[b'helloworld.py', b'42', b'abc']}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>
|
|
@ -1,7 +0,0 @@
|
|||
`py`
|
||||
|
||||
```py
|
||||
>>> 2+2
|
||||
4
|
||||
>>> (ctrl+D)
|
||||
```
|
|
@ -1,10 +1,10 @@
|
|||
R6:0[4]{}
|
||||
R6:0[5]{}
|
||||
S56:T<1>1<20>io.stderr:write(...){:[1]<17>Python <VERSION>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S35:T<1>1<13>io.write(...){:[1]<4>>>> }
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S19:T<1>1<9>M:io.read{}
|
||||
S22:T<1>1<11>G:io:M:read{}
|
||||
R26:T<1>1<17>{:[1]T:[2]<3>2+2}
|
||||
S32:T<1>1<13>io.write(...){:[1]<1>4}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
|
@ -13,7 +13,7 @@ S32:T<1>1<13>io.write(...){:[1]<1>
|
|||
R15:T<1>1<7>{:[1]T}
|
||||
S35:T<1>1<13>io.write(...){:[1]<4>>>> }
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S19:T<1>1<9>M:io.read{}
|
||||
S22:T<1>1<11>G:io:M:read{}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S39:T<1>1<20>io.stderr:write(...){:[1]<1>
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
`py`
|
||||
|
||||
```py
|
||||
>>> 'wщ' * 3
|
||||
'wщwщwщ'
|
||||
>>> (ctrl+C)
|
||||
interrupted
|
||||
```
|
|
@ -1,10 +1,10 @@
|
|||
R6:0[4]{}
|
||||
R6:0[5]{}
|
||||
S56:T<1>1<20>io.stderr:write(...){:[1]<17>Python <VERSION>
|
||||
}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S35:T<1>1<13>io.write(...){:[1]<4>>>> }
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S19:T<1>1<9>M:io.read{}
|
||||
S22:T<1>1<11>G:io:M:read{}
|
||||
R32:T<1>1<23>{:[1]T:[2]<9>'wщ' * 3}
|
||||
S43:T<1>1<13>io.write(...){:[1]<11>'wщwщwщ'}
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
|
@ -13,7 +13,7 @@ S32:T<1>1<13>io.write(...){:[1]<1>
|
|||
R15:T<1>1<7>{:[1]T}
|
||||
S35:T<1>1<13>io.write(...){:[1]<4>>>> }
|
||||
R15:T<1>1<7>{:[1]T}
|
||||
S19:T<1>1<9>M:io.read{}
|
||||
S22:T<1>1<11>G:io:M:read{}
|
||||
R40:T<1>1<31>{:[1]T:[2]F:[3]<11>interrupted}
|
||||
S50:I<1>1<20>io.stderr:write(...){:[1]<11>interrupted}
|
||||
R10:T<1>1<2>{}
|
Loading…
Reference in a new issue