Skip to content

Commit 277ee54

Browse files
committed
updated test
1 parent 2625108 commit 277ee54

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

Test/Expect/exec13.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
x = 2
2-
x = 4
3-
x = 16
4-
x = 16
5-
x = 256
6-
x = 256
7-
x = 65536
8-
Original: test text
9-
Deleted: est text
10-
Inserted: best text
1+
bf test
2+
Hello World!
3+
x = 2
4+
x = 4
5+
x = 16
6+
x = 16
7+
x = 256
8+
x = 256
9+
x = 65536
10+
Original: test text
11+
Deleted: est text
12+
Inserted: best text

Test/bftest01.b

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Hello world in Brainf*ck
2+
3+
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Test/exec13.spin

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ OBJ
1818
#else
1919
ser: "spin/FullDuplexSerial"
2020
#endif
21+
bf: "bftest01.b"
2122

2223
PUB demo | x,y
2324

@@ -27,6 +28,10 @@ PUB demo | x,y
2728
ser.start(31, 30, 0, 115200)
2829
#endif
2930

31+
send := @ser.tx
32+
send("bf test", 13, 10)
33+
bf.program()
34+
send(13)
3035
x := 2
3136
cognew(Square(@X), @SqStack)
3237
repeat 7
@@ -42,13 +47,14 @@ PUB demo | x,y
4247
bytemove(@astr+1, @astr, 9)
4348
astr[0] := "b"
4449
ReportAstr(@"Inserted: ", @astr)
50+
4551
PauseABit
4652
exit
4753

4854
PUB ReportN(n)
49-
ser.str(string("x = "))
55+
send("x = ")
5056
ser.dec(n)
51-
ser.str(string(13, 10))
57+
send(13, 10)
5258

5359
PUB ReportAstr(msg, s)
5460
ser.str(msg)

0 commit comments

Comments
 (0)