-
Notifications
You must be signed in to change notification settings - Fork 3
/
ExtractTemplate.test
46 lines (43 loc) · 1.69 KB
/
ExtractTemplate.test
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
--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _aGsEAOqTEe6_HI2dufwUIA,_Ayow4KrpEeqpkej7GeVvKQ
Element-Name: ExtractTemplate
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _ifUnQOqxEe6_HI2dufwUIA
Runtime-Version: 2.5.4.202210020716
Save-Time: 4/2/24, 3:26 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
get-view "Package Explorer" | get-tree | select "test/src/test/test.mtl" | double-click
with [get-editor "test.mtl" | get-text-viewer] {
select-range 10 1 13 1
}
get-view "Package Explorer" | get-tree | select "test/src/test/otherModule.mtl"
with [get-editor "test.mtl" | get-text-viewer] {
key-type "M2+M3+t"
}
get-editor "test.mtl" | get-text-viewer | get-property text
| equals "[module test('http://www.eclipse.org/emf/2002/Ecore')/]\n\n"
+ "[import test::ModuleServices/]\n"
+ "[import test::otherModule/]\n\n"
+ "[comment @main /]\n"
+ "[template public myTemplate(myParam : ecore::EPackage)]\n"
+ " [file (myParam.name + '.txt', overwrite)]\n"
+ " - [for (myVariable1 : ecore::EClassifier | myParam.eClassifiers)]\n"
+ " [myVariable1.myTemplate()/]\n"
+ " [/for]\n"
+ " [let eClassifiers = myParam.eClassifiers]\n"
+ " [eClassifiers.name.getMessage()/]\n"
+ " [/let]\n"
+ " [/file]\n"
+ "[/template]\n\n"
+ "[template public myTemplate(myVariable1 : ecore::EClassifier)]\n"
+ " some text [myVariable1.name/]\n"
+ " [myVariable1.myOtherTemplate()/]\n"
+ " some text [myVariable1.name.getMessage()/]\n"
+ "[/template]" | verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--