diff --git a/testsrc/doctests/parseint.doctest b/testsrc/doctests/parseint.doctest
new file mode 100644
index 0000000000..a36519e0c0
--- /dev/null
+++ b/testsrc/doctests/parseint.doctest
@@ -0,0 +1,18 @@
+js> parseInt
+function parseInt() { [native code for parseInt, arity=2] }
+js> parseInt("0");
+0
+js> parseInt("1")
+1
+js> parseInt("-1")
+-1
+js> parseInt("    2")
+2
+js> parseInt("3then some other chars")
+3
+js> parseInt('0xF')
+15
+js> parseInt('0xf')
+15
+js> parseInt('010')
+8
diff --git a/testsrc/doctests/with.doctest b/testsrc/doctests/with.doctest
new file mode 100644
index 0000000000..daeee63c53
--- /dev/null
+++ b/testsrc/doctests/with.doctest
@@ -0,0 +1,22 @@
+js> load('testsrc/doctests/util.js');
+
+js> // when the variable is not in the with-object, it'll be set on the outer scope
+js> (function() { with ({}) { var foo = 1; }; return foo; })()
+1
+
+js> // when the function is not in the with-object, it'll be set on the outer scope
+js> (function() { with ({}) { function foo() { return 2; } }; return foo(); })()
+2
+
+js> // when the variable is in the with-object, it will be updated on the with-object
+js> (function() { var obj = {foo:0}; with (obj) { var foo = 3; }; return obj.foo; })()
+3
+
+js> // functions declared inside with blocks are always bound to the closest enclosing function
+js> (function() { function foo(){ return 0; }; with ({}) { function foo() { return 4; } }; return foo(); })()
+4
+
+js> // functions declared inside with blocks do not affect the properties of the with-obj
+js> (function() { var obj = {foo:5}; with (obj) { function foo() { return 0; } }; return obj.foo; })()
+5
+