## Internal Unit Test Utilities Internal Unit Test Utilities — Utility functions for use with unit tests. |

## Stability Level

Private, unless otherwise indicated

## Functions

void | modulemd_test_signal_handler ()
void | parser_skip_headers ()
void | parser_skip_document_start ()

## Types and Values

extern int | modulemd_test_signal

## Description

## Functions

### modulemd_test_signal_handler ()

    void
    modulemd_test_signal_handler (int sig_num);

Sets the global variable modulemd_test_signal with the value of the signal that was received.

#### Parameters

sig_num | The signal received. |

Since: 2.0

### parser_skip_headers ()

    void
    parser_skip_headers (yaml_parser_t *parser);

This function will advance the parser object past the initial STREAM_START, DOCUMENT_START and MAPPING_START events to the first real entry in the first document of the YAML stream. This is intended for unit tests to move the parser location to the start of the object representation to be tested.

#### Parameters

parser | A libyaml parser object that has been initialized with an input source. | [inout]

Since: 2.0

### parser_skip_document_start ()

    void
    parser_skip_document_start (yaml_parser_t *parser);

This function will advance the parser object past the initial STREAM_START, and DOCUMENT_START events to the first real entry in the first mapping of the YAML stream. This is intended for unit tests to move the parser location to the start of the object representation to be tested.

#### Parameters

parser | A libyaml parser object that has been initialized with an input source. | [inout]

Since: 2.0

## Types and Values

### modulemd_test_signal

    extern int modulemd_test_signal;