irpack 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/irpack/entrypoint.rb +1 -1
- data/test/test_entrypoint.rb +20 -0
- metadata +2 -2
data/lib/irpack/entrypoint.rb
CHANGED
data/test/test_entrypoint.rb
CHANGED
@@ -95,5 +95,25 @@ class TC_IRPack_EntryPoint < Test::Unit::TestCase
|
|
95
95
|
assert_equal(-1, res)
|
96
96
|
end
|
97
97
|
end
|
98
|
+
|
99
|
+
def test_load_assembly
|
100
|
+
output_file = tempfilename('.dll')
|
101
|
+
module_name = 'TestModule'
|
102
|
+
entry_file = 'main.rb'
|
103
|
+
references = ironruby_assemblies
|
104
|
+
|
105
|
+
IRPack::EntryPoint.compile(output_file, module_name, entry_file, references)
|
106
|
+
asm = System::Reflection::Assembly.load_from(output_file)
|
107
|
+
main = asm.get_type("#{module_name}.EntryPoint").get_method('Main')
|
108
|
+
assert_not_nil(main)
|
109
|
+
main_rb = <<-RB
|
110
|
+
load_assembly 'IronRuby.Libraries', 'IronRuby.StandardLibrary.StringIO'
|
111
|
+
RB
|
112
|
+
create_package('main.rb' => main_rb) do |package|
|
113
|
+
assert_nothing_raised do
|
114
|
+
main.invoke(nil, System::Array[System::Object].new([package, System::Array[System::String].new(0)]))
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
98
118
|
end
|
99
119
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: irpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- kumaryu
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-08-04 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: |
|