Add missing test for debugger (#1692)

JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
This commit is contained in:
Levente Orban 2017-03-30 10:29:32 +02:00 committed by László Langó
parent 343bac56b2
commit 20466a7637
8 changed files with 45 additions and 33 deletions

View File

@ -1,2 +0,0 @@
dump
c

View File

@ -1,12 +0,0 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_dump.js:15
(jerry-debugger) dump
{60: Function(byte_code_cp:0x3c, source_name:"tests/debugger/do_dump.js", name:"", line:54, column: 8 { Breakpoint(line:58, offset:12, active_index:-1) }),
64: Function(byte_code_cp:0x40, source_name:"tests/debugger/do_dump.js", name:"func", line:34, column: 1 { Breakpoint(line:36, offset:16, active_index:-1) }),
79: Function(byte_code_cp:0x4f, source_name:"tests/debugger/do_dump.js", name:"f1", line:17, column: 1 { Breakpoint(line:30, offset:23, active_index:-1) }),
100: Function(byte_code_cp:0x64, source_name:"tests/debugger/do_dump.js", name:"g2", line:26, column: 5 { Breakpoint(line:26, offset:12, active_index:-1) }),
102: Function(byte_code_cp:0x66, source_name:"tests/debugger/do_dump.js", name:"f2", line:19, column: 3 { Breakpoint(line:27, offset:26, active_index:-1) }),
109: Function(byte_code_cp:0x6d, source_name:"tests/debugger/do_dump.js", name:"g1", line:21, column: 5 { Breakpoint(line:22, offset:18, active_index:-1),Breakpoint(line:23, offset:23, active_index:-1) }),
128: Function(byte_code_cp:0x80, source_name:"tests/debugger/do_dump.js", name:"", line:1, column: 1 { Breakpoint(line:41, offset:47, active_index:-1),Breakpoint(line:51, offset:57, active_index:-1),Breakpoint(line:49, offset:52, active_index:-1),Breakpoint(line:54, offset:62, active_index:-1),Breakpoint(line:15, offset:42, active_index:-1) })}
(jerry-debugger) c
Connection closed.

View File

@ -0,0 +1,3 @@
next
next
c

View File

@ -0,0 +1,8 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_next.js:15
(jerry-debugger) next
Stopped at tests/debugger/do_next.js:17
(jerry-debugger) next
Stopped at tests/debugger/do_next.js:18
(jerry-debugger) c
Connection closed.

28
tests/debugger/do_next.js Normal file
View File

@ -0,0 +1,28 @@
// Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
print("next test");
print ("var cat");
var cat = 'cat';
function test()
{
function f()
{
return 0;
}
}
test();

View File

@ -0,0 +1 @@
quit

View File

@ -0,0 +1,3 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_quit.js:15
(jerry-debugger) quit

View File

@ -12,24 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
print("first line of code");
function f1()
{
function f2()
{
function g1() {
a = 4;
return print("funciton f3");
}
function g2() { }
}
var
x =
6;
}
print("quit test");
function func() {
'use strict';
@ -38,7 +21,7 @@ function func() {
{
{
print("Y");
print("quit");
}
}