content.txt
1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
!2 Test variables declared on parent page.
When a variable is expressed on a page, if that variable was not defined on that page, then !-FitNesse-! looks on the parent pages until it finds one that has the variable.
----
!3 Test parent variable
* Build parent page with variable definition.
#
|script|
|start|Page Builder|
|line|!-!define x {1}-!|
|page|!-ParentPage-!|
#
* Build sub page with variable expression
#
|script|
|start|Page Builder|
|line|!-x is ${x}-!|
|page|!-ParentPage.SubPage-!|
#
* fetch sub page.
#
|Response Requester.|
|uri|valid?|contents?|
|!-ParentPage.SubPage-!|true||
#
* Make sure variable was expressed.
#
|Response Examiner.|
|type|pattern|matches?|wrapped html?|
|contents|x is 1|true||
----
!3 Make sure child variables override parent variables.
* Build sub page with both variable definition and expression.
#
|script|
|start|Page Builder|
|line|!-!define x {2}-!|
|line|!-x is ${x}-!|
|page|!-ParentPage.SubPageTwo-!|
#
* fetch sub page.
#
|Response Requester.|
|uri|valid?|contents?|
|!-ParentPage.SubPageTwo-!|true||
#
* Make sure variable definition from sub page was expressed.
#
|Response Examiner.|
|type|pattern|matches?|wrapped html?|
|contents|x is 2|true||