diff --git a/tests/debugger/do_delete.cmd b/tests/debugger/do_delete.cmd new file mode 100644 index 000000000..f9f2f0db0 --- /dev/null +++ b/tests/debugger/do_delete.cmd @@ -0,0 +1,10 @@ +next +b do_delete.js:17 +b do_delete.js:21 +b do_delete.js:19 +b do_delete.js:18 +list +delete 2 +delete 3 +list +c diff --git a/tests/debugger/do_delete.expected b/tests/debugger/do_delete.expected new file mode 100644 index 000000000..786b63fbd --- /dev/null +++ b/tests/debugger/do_delete.expected @@ -0,0 +1,22 @@ +Connecting to: localhost:5001 +Stopped at tests/debugger/do_delete.js:15 +(jerry-debugger) next +Stopped at tests/debugger/do_delete.js:17 +(jerry-debugger) b do_delete.js:17 +Breakpoint 1 at tests/debugger/do_delete.js:17 +(jerry-debugger) b do_delete.js:21 +Breakpoint not found +(jerry-debugger) b do_delete.js:19 +Breakpoint 2 at tests/debugger/do_delete.js:19 +(jerry-debugger) b do_delete.js:18 +Breakpoint 3 at tests/debugger/do_delete.js:18 +(jerry-debugger) list +1: tests/debugger/do_delete.js:17 +2: tests/debugger/do_delete.js:19 +3: tests/debugger/do_delete.js:18 +(jerry-debugger) delete 2 +(jerry-debugger) delete 3 +(jerry-debugger) list +1: tests/debugger/do_delete.js:17 +(jerry-debugger) c +Connection closed. diff --git a/tests/debugger/do_delete.js b/tests/debugger/do_delete.js new file mode 100644 index 000000000..f4b42e8ec --- /dev/null +++ b/tests/debugger/do_delete.js @@ -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("delete tests"); + +var x = 10; +var y = 10; +var pi = 3.14; + +function delete_test(x,y) { + var sum = x + y; + return +} + +delete_test(x, y); + +var z = 0; diff --git a/tests/debugger/do_help.cmd b/tests/debugger/do_help.cmd new file mode 100644 index 000000000..7906d522c --- /dev/null +++ b/tests/debugger/do_help.cmd @@ -0,0 +1,2 @@ +help +quit diff --git a/tests/debugger/do_help.expected b/tests/debugger/do_help.expected new file mode 100644 index 000000000..0d8ca5a1f --- /dev/null +++ b/tests/debugger/do_help.expected @@ -0,0 +1,10 @@ +Connecting to: localhost:5001 +Stopped at tests/debugger/do_help.js:15 +(jerry-debugger) help + +Documented commands (type help ): +======================================== +b break c delete e help n quit src +backtrace bt continue dump eval list next s step + +(jerry-debugger) quit diff --git a/tests/debugger/do_help.js b/tests/debugger/do_help.js new file mode 100644 index 000000000..efc849fee --- /dev/null +++ b/tests/debugger/do_help.js @@ -0,0 +1,15 @@ +// 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("help tests"); diff --git a/tests/debugger/do_list.cmd b/tests/debugger/do_list.cmd new file mode 100644 index 000000000..2dbab7589 --- /dev/null +++ b/tests/debugger/do_list.cmd @@ -0,0 +1,4 @@ +b do_list.js:18 +b do_list.js:19 +list +quit diff --git a/tests/debugger/do_list.expected b/tests/debugger/do_list.expected new file mode 100644 index 000000000..5425332eb --- /dev/null +++ b/tests/debugger/do_list.expected @@ -0,0 +1,10 @@ +Connecting to: localhost:5001 +Stopped at tests/debugger/do_list.js:15 +(jerry-debugger) b do_list.js:18 +Breakpoint 1 at tests/debugger/do_list.js:18 +(jerry-debugger) b do_list.js:19 +Breakpoint 2 at tests/debugger/do_list.js:19 +(jerry-debugger) list +1: tests/debugger/do_list.js:18 +2: tests/debugger/do_list.js:19 +(jerry-debugger) quit diff --git a/tests/debugger/do_list.js b/tests/debugger/do_list.js new file mode 100644 index 000000000..2fe71980c --- /dev/null +++ b/tests/debugger/do_list.js @@ -0,0 +1,20 @@ +// 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("list tests"); + +var x = 10; +var y = 10; +var pi = 3.14; +var z = x + y;