@@ -698,7 +698,7 @@ END_RECORD`,
698698 "awk '/ERROR BLOCK START/,/ERROR BLOCK END/ { count++ } END { print count }' /logs/server.log" ,
699699 ) ;
700700 // Two blocks, 5 lines each (START + error + stack + 2 traces + END)
701- expect ( parseInt ( result . stdout . trim ( ) ) ) . toBeGreaterThan ( 8 ) ;
701+ expect ( parseInt ( result . stdout . trim ( ) , 10 ) ) . toBeGreaterThan ( 8 ) ;
702702 expect ( result . exitCode ) . toBe ( 0 ) ;
703703 } ) ;
704704 } ) ;
@@ -718,9 +718,7 @@ END_RECORD`,
718718
719719 it ( "should extract cache settings" , async ( ) => {
720720 const env = createLogEnv ( ) ;
721- const result = await env . exec (
722- "grep -A3 '\\[cache\\]' /logs/config.ini" ,
723- ) ;
721+ const result = await env . exec ( "grep -A3 '\\[cache\\]' /logs/config.ini" ) ;
724722 expect ( result . stdout ) . toContain ( "[cache]" ) ;
725723 expect ( result . stdout ) . toContain ( "enabled=true" ) ;
726724 expect ( result . stdout ) . toContain ( "ttl=3600" ) ;
@@ -732,9 +730,11 @@ END_RECORD`,
732730 it ( "should combine record fields using getline" , async ( ) => {
733731 const env = createLogEnv ( ) ;
734732 const result = await env . exec (
735- "awk '/^RECORD:/ { id=$2; getline; split($0,a,\": \"); name=a[2]; getline; split($0,b,\": \"); email=b[2]; print id, name, email }' /data/records.txt" ,
733+ 'awk \'/^RECORD:/ { id=$2; getline; split($0,a,": "); name=a[2]; getline; split($0,b,": "); email=b[2]; print id, name, email }\' /data/records.txt' ,
734+ ) ;
735+ expect ( result . stdout ) . toContain (
736+ "user001 Alice Johnson alice@example.com" ,
736737 ) ;
737- expect ( result . stdout ) . toContain ( "user001 Alice Johnson alice@example.com" ) ;
738738 expect ( result . stdout ) . toContain ( "user002 Bob Smith bob@example.com" ) ;
739739 expect ( result . exitCode ) . toBe ( 0 ) ;
740740 } ) ;
@@ -895,7 +895,7 @@ Stack trace follows...`,
895895 it ( "should sanitize for SQL safety (remove quotes)" , async ( ) => {
896896 const env = createSanitizeEnv ( ) ;
897897 const result = await env . exec (
898- " echo \ "user'; DROP TABLE users;--\ " | tr -d \"';\"" ,
898+ ' echo "user\ '; DROP TABLE users;--" | tr -d "\';"' ,
899899 ) ;
900900 expect ( result . stdout ) . not . toContain ( "'" ) ;
901901 expect ( result . stdout ) . not . toContain ( ";" ) ;
0 commit comments