rtext 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/Rakefile +1 -1
- data/lib/rtext/frontend/context.rb +12 -12
- data/test/frontend/context_test.rb +101 -5
- data/test/instantiator_test.rb +13 -0
- data/test/integration/backend.out +13 -13
- data/test/integration/frontend.log +2154 -0
- data/test/integration/model/test_metamodel3.ect4 +7 -0
- data/test/integration/test.rb +57 -9
- metadata +16 -15
data/test/integration/test.rb
CHANGED
@@ -9,6 +9,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|
9
9
|
|
10
10
|
ModelFile = File.dirname(__FILE__)+"/model/test_metamodel.ect"
|
11
11
|
ModelFile2 = File.dirname(__FILE__)+"/model/test_metamodel2.ect"
|
12
|
+
ModelFile3 = File.dirname(__FILE__)+"/model/test_metamodel3.ect4"
|
12
13
|
LargeWithErrorsFile = File.dirname(__FILE__)+"/model/test_large_with_errors.ect3"
|
13
14
|
InvalidEncodingFile = File.dirname(__FILE__)+"/model/invalid_encoding.invenc"
|
14
15
|
NotInRTextFile = File.dirname(__FILE__)+"/model/test.not_in_rtext"
|
@@ -495,12 +496,59 @@ EPackage StatemachineMM {
|
|
495
496
|
|],
|
496
497
|
END
|
497
498
|
assert_completions context, [
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
499
|
+
]
|
500
|
+
end
|
501
|
+
|
502
|
+
def test_complete_after_backslash
|
503
|
+
setup_connector(ModelFile3)
|
504
|
+
load_model
|
505
|
+
context = build_context <<-END
|
506
|
+
EPackage StatemachineMM3 {
|
507
|
+
EClass State
|
508
|
+
EClass \\
|
509
|
+
|SimpleState,
|
510
|
+
END
|
511
|
+
assert_completions context, [
|
512
|
+
"name",
|
513
|
+
"abstract:",
|
514
|
+
"interface:",
|
515
|
+
"eSuperTypes:",
|
516
|
+
"instanceClassName:"
|
517
|
+
]
|
518
|
+
end
|
519
|
+
|
520
|
+
def test_complete_after_backslash2
|
521
|
+
setup_connector(ModelFile3)
|
522
|
+
load_model
|
523
|
+
context = build_context <<-END
|
524
|
+
EPackage StatemachineMM3 {
|
525
|
+
EClass State
|
526
|
+
EClass \\
|
527
|
+
SimpleState,
|
528
|
+
|eSuperTypes: [/StatemachineMM3/State]
|
529
|
+
END
|
530
|
+
assert_completions context, [
|
531
|
+
"abstract:",
|
532
|
+
"interface:",
|
533
|
+
"eSuperTypes:",
|
534
|
+
"instanceClassName:"
|
535
|
+
]
|
536
|
+
end
|
537
|
+
|
538
|
+
def test_link_target_after_backslash
|
539
|
+
setup_connector(ModelFile3)
|
540
|
+
load_model
|
541
|
+
context = build_context <<-END
|
542
|
+
EPackage StatemachineMM3 {
|
543
|
+
EClass State
|
544
|
+
EClass \\
|
545
|
+
SimpleState,
|
546
|
+
eSuperTypes: [/S|tatemachineMM3/State]
|
547
|
+
END
|
548
|
+
assert_link_targets context, :file => ModelFile3, :begin => 45, :end => 66, :targets => [
|
549
|
+
{"file"=> File.expand_path(ModelFile3),
|
550
|
+
"line"=>2,
|
551
|
+
"display"=>"/StatemachineMM3/State [EClass]"}
|
504
552
|
]
|
505
553
|
end
|
506
554
|
|
@@ -783,7 +831,7 @@ EPackage StatemachineMM {
|
|
783
831
|
# in case of linebreaks, the begin and end column refer to the string which
|
784
832
|
# was passed to the backend as the context; in this case the context extractor
|
785
833
|
# appends each broken line to the previous line with all the leading whitespace removed
|
786
|
-
assert_link_targets context, :begin =>
|
834
|
+
assert_link_targets context, :begin => 37, :end => 66, :targets => [
|
787
835
|
{"file"=> File.expand_path(@infile),
|
788
836
|
"line"=>9,
|
789
837
|
"display"=>"/StatemachineMM/CompositeState [EClass]"}
|
@@ -795,7 +843,7 @@ EPackage StatemachineMM {
|
|
795
843
|
EReference parent,
|
796
844
|
eType: |/StatemachineMM/CompositeState,
|
797
845
|
END
|
798
|
-
assert_link_targets context, :begin =>
|
846
|
+
assert_link_targets context, :begin => 37, :end => 66, :targets => [
|
799
847
|
{"file"=> File.expand_path(@infile),
|
800
848
|
"line"=>9,
|
801
849
|
"display"=>"/StatemachineMM/CompositeState [EClass]"}
|
@@ -807,7 +855,7 @@ EPackage StatemachineMM {
|
|
807
855
|
EReference parent,
|
808
856
|
eType: /StatemachineMM/CompositeStat|e,
|
809
857
|
END
|
810
|
-
assert_link_targets context, :begin =>
|
858
|
+
assert_link_targets context, :begin => 37, :end => 66, :targets => [
|
811
859
|
{"file"=> File.expand_path(@infile),
|
812
860
|
"line"=>9,
|
813
861
|
"display"=>"/StatemachineMM/CompositeState [EClass]"}
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Thiede
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rgen
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.6.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.6.1
|
27
27
|
description: RText can be used to derive textual languages from an RGen metamodel
|
@@ -36,6 +36,12 @@ extra_rdoc_files:
|
|
36
36
|
- RText_Users_Guide
|
37
37
|
- RText_Protocol
|
38
38
|
files:
|
39
|
+
- CHANGELOG
|
40
|
+
- MIT-LICENSE
|
41
|
+
- README.rdoc
|
42
|
+
- RText_Protocol
|
43
|
+
- RText_Users_Guide
|
44
|
+
- Rakefile
|
39
45
|
- lib/rtext/context_builder.rb
|
40
46
|
- lib/rtext/default_completer.rb
|
41
47
|
- lib/rtext/default_loader.rb
|
@@ -72,6 +78,7 @@ files:
|
|
72
78
|
- test/integration/model/test_large_with_errors.ect3
|
73
79
|
- test/integration/model/test_metamodel.ect
|
74
80
|
- test/integration/model/test_metamodel2.ect
|
81
|
+
- test/integration/model/test_metamodel3.ect4
|
75
82
|
- test/integration/model/test_metamodel_error.ect2
|
76
83
|
- test/integration/model/test_metamodel_ok.ect2
|
77
84
|
- test/integration/test.rb
|
@@ -80,36 +87,30 @@ files:
|
|
80
87
|
- test/rtext_test.rb
|
81
88
|
- test/serializer_test.rb
|
82
89
|
- test/tokenizer_test.rb
|
83
|
-
- README.rdoc
|
84
|
-
- CHANGELOG
|
85
|
-
- MIT-LICENSE
|
86
|
-
- RText_Users_Guide
|
87
|
-
- RText_Protocol
|
88
|
-
- Rakefile
|
89
90
|
homepage: http://ruby-gen.org
|
90
91
|
licenses: []
|
91
92
|
metadata: {}
|
92
93
|
post_install_message:
|
93
94
|
rdoc_options:
|
94
|
-
- --main
|
95
|
+
- "--main"
|
95
96
|
- README.rdoc
|
96
|
-
- -x
|
97
|
+
- "-x"
|
97
98
|
- test
|
98
99
|
require_paths:
|
99
100
|
- lib
|
100
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
102
|
requirements:
|
102
|
-
- -
|
103
|
+
- - ">="
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
107
|
requirements:
|
107
|
-
- -
|
108
|
+
- - ">="
|
108
109
|
- !ruby/object:Gem::Version
|
109
110
|
version: '0'
|
110
111
|
requirements: []
|
111
112
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.2.3
|
113
114
|
signing_key:
|
114
115
|
specification_version: 4
|
115
116
|
summary: Ruby Textual Modelling
|