summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/compile/README.md9
-rw-r--r--src/parse.y2
-rw-r--r--test/assert.rb2
-rw-r--r--test/driver.c7
4 files changed, 18 insertions, 2 deletions
diff --git a/doc/compile/README.md b/doc/compile/README.md
index c6ab2f584..ce968b36e 100644
--- a/doc/compile/README.md
+++ b/doc/compile/README.md
@@ -64,6 +64,15 @@ Toolchain configuration for Visual Studio 2012 on Windows.
toolchain :vs2012
+#### Android
+
+Toolchain configuration for Android.
+
+ toolchain :androideabi
+
+Requires the custom standalone Android NDK and the toolchain path
+in ```ANDROID_STANDALONE_TOOLCHAIN```.
+
### Binaries
It is possible to select which tools should be compiled during the compilation
diff --git a/src/parse.y b/src/parse.y
index 9ee9c9bec..91fb1a8e8 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3000,7 +3000,7 @@ yywarn(parser_state *p, const char *s)
}
#endif
}
- else if (p->nerr < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
+ else if (p->nwarn < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
n = strlen(s);
c = (char *)parser_palloc(p, n + 1);
memcpy(c, s, n + 1);
diff --git a/test/assert.rb b/test/assert.rb
index 4fe95de9d..218a911d4 100644
--- a/test/assert.rb
+++ b/test/assert.rb
@@ -23,6 +23,7 @@ end
# which will be tested by this
# assertion
def assert(str = 'Assertion failed', iso = '')
+ print(str, (iso != '' ? " [#{iso}]" : ''), ' : ') if $mrbtest_verbose
begin
if(!yield)
$asserts.push(assertion_string('Fail: ', str, iso))
@@ -37,6 +38,7 @@ def assert(str = 'Assertion failed', iso = '')
$kill_test += 1
print('X')
end
+ print("\n") if $mrbtest_verbose
end
##
diff --git a/test/driver.c b/test/driver.c
index 788a77b2d..5183145b4 100644
--- a/test/driver.c
+++ b/test/driver.c
@@ -36,7 +36,7 @@ check_error(mrb_state *mrb)
}
int
-main(void)
+main(int argc, char **argv)
{
mrb_state *mrb;
mrb_value return_value;
@@ -52,6 +52,11 @@ main(void)
return EXIT_FAILURE;
}
+ if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) {
+ printf("verbose mode: enable\n\n");
+ mrb_gv_set(mrb, mrb_intern(mrb, "$mrbtest_verbose"), mrb_true_value());
+ }
+
mrb_init_mrbtest(mrb);
/* evaluate the test */
return_value = mrb_load_string(mrb, prog);