Skip to content

assert

assert::equals

Assert that the two given values are equal.

Inputs:

  • $1: expected value as string:

    The expected value.

  • $2: actual value as string:

    The actual value to compare with the expected value.

Example usage:

assert::equals "expected value" "actual value"

assert::isDirectory

Assert that the given directory exists and is a directory.

Inputs:

  • $1: directory path as string:

    The path of the directory to check.

Example usage:

assert::isDirectory "/path/to/directory"

assert::isFile

Assert that the given file exists and is a regular file.

Inputs:

  • $1: file path as string:

    The path of the file to check.

Example usage:

assert::isFile "/path/to/file"

assert::isLink

Assert that the given path exists and is a symbolic link.

Inputs:

  • $1: link path as string:

    The path of the symbolic link to check.

Example usage:

assert::isLink "/path/to/link"

assert::isPath

Assert that the given path exists (can be a file, directory, or link).

Inputs:

  • $1: file path as string:

    The path of the file to check.

Example usage:

assert::isPath "/path/to/file"

Important

Documentation generated for the version 0.43.381 (2026-07-27).