From 2c37e4477e35b16298825ddc455dea3ed1b3bb0d Mon Sep 17 00:00:00 2001 From: Herman Venter Date: Wed, 12 Jun 2013 14:35:49 -0700 Subject: [PATCH] Port debugger unit tests for break command to new framework Port debugger unit tests for break command to new framework to prepare for added many more tests dealing with nested namespaces. --- hphp/test/quick/debugger/break1.php | 24 +++++++ hphp/test/quick/debugger/break1.php.expectf | 80 +++++++++++++++++++++ hphp/test/quick/debugger/break1.php.in | 26 +++++++ hphp/test/quick/debugger/break2.php | 19 +++++ hphp/test/quick/debugger/break2.php.expectf | 47 ++++++++++++ hphp/test/quick/debugger/break2.php.in | 14 ++++ hphp/test/quick/debugger/break3.php | 20 ++++++ hphp/test/quick/debugger/break3.php.expectf | 52 ++++++++++++++ hphp/test/quick/debugger/break3.php.in | 18 +++++ hphp/test/quick/debugger/break4.php | 13 ++++ hphp/test/quick/debugger/break4.php.expectf | 18 +++++ hphp/test/quick/debugger/break4.php.in | 6 ++ 12 files changed, 337 insertions(+) create mode 100644 hphp/test/quick/debugger/break1.php create mode 100644 hphp/test/quick/debugger/break1.php.expectf create mode 100644 hphp/test/quick/debugger/break1.php.in create mode 100644 hphp/test/quick/debugger/break2.php create mode 100644 hphp/test/quick/debugger/break2.php.expectf create mode 100644 hphp/test/quick/debugger/break2.php.in create mode 100644 hphp/test/quick/debugger/break3.php create mode 100644 hphp/test/quick/debugger/break3.php.expectf create mode 100644 hphp/test/quick/debugger/break3.php.in create mode 100644 hphp/test/quick/debugger/break4.php create mode 100644 hphp/test/quick/debugger/break4.php.expectf create mode 100644 hphp/test/quick/debugger/break4.php.in diff --git a/hphp/test/quick/debugger/break1.php b/hphp/test/quick/debugger/break1.php new file mode 100644 index 000000000..2c7e8c4a0 --- /dev/null +++ b/hphp/test/quick/debugger/break1.php @@ -0,0 +1,24 @@ +pubObj('test_break3') +Breakpoint 1 reached at cls::pubObj() on line 12 of %s/break1.php + 11 public function pubObj($x) { + 12 error_log("pubObj:".$x); + 13 } + +variable +$x = "test_break3" +break clear all +All breakpoints are cleared. +continue +pubObj:test_break3 + +break cls::pubCls() +Breakpoint 1 set upon entering cls::pubCls() +@ cls::pubCls('test_break4') +Breakpoint 1 reached at cls::pubCls() on line 15 of %s/break1.php + 14 public static function pubCls($x) { + 15 error_log("pubCls:".$x); + 16 } + +variable +$x = "test_break4" +break clear all +All breakpoints are cleared. +continue +pubCls:test_break4 + +@ $break5=new cls() + +@ $break5->pubHardBreak('test_break5') +pubHardBreak:test_break5 +Break at cls::pubHardBreak() on line 19 of %s/break1.php + 18 error_log("pubHardBreak:".$x); + 19 hphpd_break(); + 20 error_log("pubHardBreak:done"); + +continue +pubHardBreak:done + +quit diff --git a/hphp/test/quick/debugger/break1.php.in b/hphp/test/quick/debugger/break1.php.in new file mode 100644 index 000000000..6e7cfc031 --- /dev/null +++ b/hphp/test/quick/debugger/break1.php.in @@ -0,0 +1,26 @@ +run +break break1.php:7 +@ foo('test_break1') +variable +break clear all +continue +break foo() +@ foo('test_break2') +variable +break clear all +continue +break cls::pubObj() +@ $break3=new cls() +@ $break3->pubObj('test_break3') +variable +break clear all +continue +break cls::pubCls() +@ cls::pubCls('test_break4') +variable +break clear all +continue +@ $break5=new cls() +@ $break5->pubHardBreak('test_break5') +continue +quit diff --git a/hphp/test/quick/debugger/break2.php b/hphp/test/quick/debugger/break2.php new file mode 100644 index 000000000..ad94fbbaa --- /dev/null +++ b/hphp/test/quick/debugger/break2.php @@ -0,0 +1,19 @@ +pubObj('test_break6') +Breakpoint 3 reached at cls2::pubObj() on line 12 of %s/break2.php + 11 public function pubObj($x) { + 12 error_log("pubObj2:".$x); + 13 } + +continue +pubObj2:test_break6 + +@ cls2::pubCls('test_break6') +Breakpoint 4 reached at cls2::pubCls() on line 15 of %s/break2.php + 14 public static function pubCls($x) { + 15 error_log("pubCls2:".$x); + 16 } + +break clear all +All breakpoints are cleared. +continue +pubCls2:test_break6 + +quit diff --git a/hphp/test/quick/debugger/break2.php.in b/hphp/test/quick/debugger/break2.php.in new file mode 100644 index 000000000..c8985638a --- /dev/null +++ b/hphp/test/quick/debugger/break2.php.in @@ -0,0 +1,14 @@ +break break2.php:7 +break foo2() +break cls2::pubObj() +break cls2::pubCls() +run +@ foo2('test_break6') +continue +@ $break6=new cls2() +@ $break6->pubObj('test_break6') +continue +@ cls2::pubCls('test_break6') +break clear all +continue +quit diff --git a/hphp/test/quick/debugger/break3.php b/hphp/test/quick/debugger/break3.php new file mode 100644 index 000000000..4135ba8bd --- /dev/null +++ b/hphp/test/quick/debugger/break3.php @@ -0,0 +1,20 @@ +pubObj('test_break8') +Breakpoint 1 reached at TestNs\cls::pubObj() on line 13 of %s/break3.php + 12 public function pubObj($x) { + 13 \error_log("pubObj:".$x); + 14 } + +variable +$x = "test_break8" +break clear all +All breakpoints are cleared. +continue +pubObj:test_break8 + +break \TestNs\cls::pubCls() +Breakpoint 1 set upon entering TestNs\cls::pubCls() +@ \TestNs\cls::pubCls('test_break9') +Breakpoint 1 reached at TestNs\cls::pubCls() on line 16 of %s/break3.php + 15 public static function pubCls($x) { + 16 \error_log("pubCls:".$x); + 17 } + +variable +$x = "test_break9" +break clear all +All breakpoints are cleared. +continue +pubCls:test_break9 + +quit diff --git a/hphp/test/quick/debugger/break3.php.in b/hphp/test/quick/debugger/break3.php.in new file mode 100644 index 000000000..4bab06213 --- /dev/null +++ b/hphp/test/quick/debugger/break3.php.in @@ -0,0 +1,18 @@ +continue +break \TestNs\foo() +@ \TestNs\foo('test_break7') +variable +break clear all +continue +break TestNs\cls::pubObj() +@ $break8=new \TestNs\cls() +@ $break8->pubObj('test_break8') +variable +break clear all +continue +break \TestNs\cls::pubCls() +@ \TestNs\cls::pubCls('test_break9') +variable +break clear all +continue +quit diff --git a/hphp/test/quick/debugger/break4.php b/hphp/test/quick/debugger/break4.php new file mode 100644 index 000000000..112bd1cb3 --- /dev/null +++ b/hphp/test/quick/debugger/break4.php @@ -0,0 +1,13 @@ +