Q7

Regular expression in select or get-item always fail to match if there is a line break within message being matched.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.3.11
  • Fix Version/s: 1.3.12
  • Component/s: Runtime
  • Labels:
  • Test Mode:
    Manual

Description

Ticket link: http://xored.freshdesk.com/helpdesk/tickets/964

Reproducing snippet
try {
  with [get-view "Error Log"] {
      get-button "Delete Log" | click
      get-window "Confirm Delete" | get-button OK | click
  }
} -catch {}
with [get-view "Error Log" | get-tree] {
   echo "First test message" | log error
   get-item "First.*" // Success
   echo "Second\r\ntest message" | log error
   get-item "Second.*" // Fails here due to Q7 bug
}

Activity

Vasili Gulevich made changes - 04/Jun/14 11:55 PM
Field Original Value New Value
Description Ticket link: http://xored.freshdesk.com/helpdesk/tickets/964

Illustrated by following snipppet:

try {
  with [get-view "Error Log"] {
      get-button "Delete Log" | click
      get-window "Confirm Delete" | get-button OK | click
  }
} -catch {}
with [get-view "Error Log" | get-tree] {
   echo "First test message" | log error
   get-item "First.*"
   echo "Second\r\ntest message" | log error
   get-item "Second.*" // Fails here due to Q7 bug
}
Ticket link: http://xored.freshdesk.com/helpdesk/tickets/964

{code:title=Reproducing snippet}
try {
  with [get-view "Error Log"] {
      get-button "Delete Log" | click
      get-window "Confirm Delete" | get-button OK | click
  }
} -catch {}
with [get-view "Error Log" | get-tree] {
   echo "First test message" | log error
   get-item "First.*"
   echo "Second\r\ntest message" | log error
   get-item "Second.*" // Fails here due to Q7 bug
}
{code}
Vasili Gulevich made changes - 04/Jun/14 11:57 PM
Description Ticket link: http://xored.freshdesk.com/helpdesk/tickets/964

{code:title=Reproducing snippet}
try {
  with [get-view "Error Log"] {
      get-button "Delete Log" | click
      get-window "Confirm Delete" | get-button OK | click
  }
} -catch {}
with [get-view "Error Log" | get-tree] {
   echo "First test message" | log error
   get-item "First.*"
   echo "Second\r\ntest message" | log error
   get-item "Second.*" // Fails here due to Q7 bug
}
{code}
Ticket link: http://xored.freshdesk.com/helpdesk/tickets/964

{code:title=Reproducing snippet}
try {
  with [get-view "Error Log"] {
      get-button "Delete Log" | click
      get-window "Confirm Delete" | get-button OK | click
  }
} -catch {}
with [get-view "Error Log" | get-tree] {
   echo "First test message" | log error
   get-item "First.*" // Success
   echo "Second\r\ntest message" | log error
   get-item "Second.*" // Fails here due to Q7 bug
}
{code}
Hide
Ulyana Skorokhodova added a comment - 05/Jun/14 3:53 PM

The reason is that .* doesn't match a line break. get-item "(?s)Error.*" pattern should be used for multi-line messages.

Show
Ulyana Skorokhodova added a comment - 05/Jun/14 3:53 PM The reason is that .* doesn't match a line break. get-item "(?s)Error.*" pattern should be used for multi-line messages.
Ulyana Skorokhodova made changes - 05/Jun/14 3:53 PM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
Transition Time In Source Status Execution Times Last Executer Last Execution Date
Open Open Resolved Resolved
17h 29m 1 Ulyana Skorokhodova 05/Jun/14 3:53 PM

People

Vote (0)
Watch (0)

Dates

  • Created:
    04/Jun/14 10:24 PM
    Updated:
    05/Jun/14 3:53 PM
    Resolved:
    05/Jun/14 3:53 PM