Crinit -- Configurable Rootfs Init
utest-lexers-envset-outer.h File Reference

(2023-10-16, commit: 49337e0)

Header declaring the unit tests for crinitEnvVarOuterLex(). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void crinitEnvVarOuterLexTestSuccess (void **state)
 
void crinitEnvVarOuterLexTestNullInput (void **state)
 
void crinitEnvVarOuterLexTestLexerError (void **state)
 

Detailed Description

Header declaring the unit tests for crinitEnvVarOuterLex().

Function Documentation

◆ crinitEnvVarOuterLexTestLexerError()

void crinitEnvVarOuterLexTestLexerError ( void **  state)

Tests cases leading to a lexer error (CRINIT_TK_ERR).

For crinitEnvVarOuterLex() that can only happen if the input string starts with a character not allowed in an environment key AND is not an opening double quote.

◆ crinitEnvVarOuterLexTestNullInput()

void crinitEnvVarOuterLexTestNullInput ( void **  state)

Tests detection of NULL pointer inputs.

crinitEnvVarOuterLex() shall fail if any pointer input parameter is NULL and/or the string in *s is NULL.

◆ crinitEnvVarOuterLexTestSuccess()

void crinitEnvVarOuterLexTestSuccess ( void **  state)

Tests successful lex-ing of valid inputs.

All possible return values of crinitEnvVarOuterLex() save for CRINIT_TK_ERR are triggered using accordingly built input strings.