Skip to content

Commit 46fc3ff

Browse files
committed
basic test + disasm: add bind stuff
Plus, change the "service1" block type to just "service".
1 parent b0a1854 commit 46fc3ff

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

testdata/basic_test.bcl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def tunnel "hostyhost-service1" {
1919
enabled = not cond_long
2020
}
2121

22-
def service1 "another-service1" {
22+
def service "another-service" {
2323
host = "yet" + "." + "another.com"
2424
local_port = service1_local_base_port + 1
2525
remote_port = service1_default_port
@@ -43,3 +43,11 @@ def just_a_test "test" {
4343
field2 = "pi=" + field1
4444
}
4545
}
46+
47+
def service "this" { host = "this.as.well.com" }
48+
49+
50+
bind {
51+
tunnel:1
52+
service:"this",
53+
}

testdata/basic_test.disasm

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
0086 | SETFIELD 15 'enabled'
6262
0088 | POP
6363
0089 20:2 ENDBLOCK
64-
0090 22:34 DEFBLOCK 16 'service1' 17 'another-service1'
64+
0090 22:32 DEFBLOCK 16 'service' 17 'another-service'
6565
0093 23:14 CONST 18 'yet'
6666
0095 23:20 CONST 19 '.'
6767
0097 | ADD
@@ -149,5 +149,14 @@
149149
0225 | POP
150150
0226 44:3 ENDBLOCK
151151
0227 45:2 ENDBLOCK
152-
0228 46:1 POPN 12
153-
0230 | RET
152+
0228 47:21 DEFBLOCK 16 'service' 49 'this'
153+
0231 47:47 CONST 50 'this.as.well.com'
154+
0233 | SETFIELD 13 'host'
155+
0235 | POP
156+
0236 47:49 ENDBLOCK
157+
0237 50:7 DEFUBIND
158+
0238 51:10 BIND 0x11 9 'tunnel' 0#
159+
0242 52:17 BIND 0x25 16 'service' 1# 49 'this'
160+
0247 53:2 ENDUBIND
161+
0248 54:1 POPN 12
162+
0250 | RET

0 commit comments

Comments
 (0)