File: StackFrames.feature

package info (click to toggle)
dap-mode 0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,556 kB
  • sloc: lisp: 6,299; makefile: 31; java: 27; xml: 23
file content (53 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Feature: Stack traces

  Background:
    Given I have maven project "m" in "tmp"
    And I add project "m" folder "tmp" to the list of workspace folders
    And I open a java file "tmp/m/src/main/java/temp/App.java"
    And I clear the buffer
    And I insert:
    """
    package temp;

    public class App {
      public static void main(String[] args) {
        String inMainMethod = "inMainMethod";
        foo();
      }

      private static void foo() {
        String inFooMethod = "inFooMethod";
        System.out.println();
      }
    }
    """
    And I call "save-buffer"
    And I start lsp-java
    And The server status must become "LSP::Started"

  @StackFrames
  Scenario: Eval multiple frames
    When I place the cursor before "System"
    And I call "dap-toggle-breakpoint"
    And I go to beginning of buffer
    And I attach handler "breakpoint" to hook "dap-stopped-hook"
    And I call "dap-java-debug"
    Then The hook handler "breakpoint" would be called
    And I attach handler "executed" to hook "dap-executed-hook"
    And I start an action chain
    When I press "M-x"
    When I type "dap-eval"
    And I press "<return>"
    When I type "inFooMethod"
    And I press "<return>"
    And I execute the action chain
    Then The hook handler "executed" would be called
    And I should see message matching regexp "\"inFooMethod\".*"
    And I start an action chain
    When I press "M-x"
    When I type "dap-switch-stack-frame"
    And I press "<return>"
    When I type "App.main"
    And I press "<return>"
    And I execute the action chain
    And the cursor should be before "    foo();"