Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
c1ca6621
Commit
c1ca6621
authored
Jan 30, 2013
by
Carson McDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed variable $test_args to constant TEST_ARGS
parent
33081f52
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
+1
-1
examples/mrbgems/c_extension_example/mrbgem.rake
examples/mrbgems/c_extension_example/mrbgem.rake
+1
-1
examples/mrbgems/ruby_extension_example/mrbgem.rake
examples/mrbgems/ruby_extension_example/mrbgem.rake
+1
-1
tasks/mrbgems_test.rake
tasks/mrbgems_test.rake
+1
-1
No files found.
examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
View file @
c1ca6621
...
...
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
# Values accessible as
$test_args
inside test scripts
# Values accessible as
TEST_ARGS
inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
examples/mrbgems/c_extension_example/mrbgem.rake
View file @
c1ca6621
...
...
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('c_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
# Values accessible as
$test_args
inside test scripts
# Values accessible as
TEST_ARGS
inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
examples/mrbgems/ruby_extension_example/mrbgem.rake
View file @
c1ca6621
...
...
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('ruby_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
# Values accessible as
$test_args
inside test scripts
# Values accessible as
TEST_ARGS
inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
tasks/mrbgems_test.rake
View file @
c1ca6621
...
...
@@ -40,7 +40,7 @@ MRuby.each_target do
escaped_arg_value
=
arg_value
.
gsub
(
'\\'
,
'\\\\\\\\'
).
gsub
(
'"'
,
'\"'
)
f
.
puts
%Q[ mrb_hash_set(mrb2, test_args_hash, mrb_str_new(mrb2, "
#{
escaped_arg_name
.
to_s
}
",
#{
escaped_arg_name
.
to_s
.
length
}
), mrb_str_new(mrb2, "
#{
escaped_arg_value
.
to_s
}
",
#{
escaped_arg_value
.
to_s
.
length
}
)); ]
end
f
.
puts
%Q[ mrb_
gv_set(mrb2, mrb_intern(mrb2, "$test_args
"), test_args_hash); ]
f
.
puts
%Q[ mrb_
const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern(mrb2, "TEST_ARGS
"), test_args_hash); ]
end
f
.
puts
%Q[ mrb_
#{
g
.
funcname
}
_gem_test(mrb2);]
unless
g
.
test_objs
.
empty?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment