Log Surgeon
Test & API docs
Loading...
Searching...
No Matches
Buffer parser using variables without capture groups.

Tests covering variable matching without regex capture groups. More...

Functions

void single_line_without_capture ()
 Tests the buffer parser behavior when parsing variables without capture groups.

Detailed Description

Tests covering variable matching without regex capture groups.

Function Documentation

◆ single_line_without_capture()

void single_line_without_capture ( )

Tests the buffer parser behavior when parsing variables without capture groups.

This test verifies that the buffer parser correctly matches exact variable patterns when no capture groups are involved. It confirms the BufferParser:

  • Recognizes a variable exactly matching the defined schema ("myVar:userID=123").
  • Treats close but non-matching strings as uncaught tokens.
  • Correctly classifies tokens that don't match any variable schema as uncaught strings.

Schema Definition

delimiters: \n\r\[:,
myVar:userID=123

Test Input

"userID=123 userID=234 userID=123 123 userID=123"

Expected Logtype

"<myVar> userID=234 <myVar> 123 <myVar>"

Expected Tokenization

"userID=123" -> "myVar"
" userID=234" -> uncaught string
" userID=123" -> "myVar"
" 123" -> uncaught string
" userID=123" -> "myVar"