diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
commit | cd07912073c951b4bbb871ed2653af1be2cfc714 (patch) | |
tree | 1073c2308492e6aea4c66cb7436ee92db2abfd42 /tools/lint/tests/shunit2/list.sh | |
parent | Initial commit. (diff) | |
download | libyang2-upstream/2.1.30.tar.xz libyang2-upstream/2.1.30.zip |
Adding upstream version 2.1.30.upstream/2.1.30upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/lint/tests/shunit2/list.sh')
-rwxr-xr-x | tools/lint/tests/shunit2/list.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/lint/tests/shunit2/list.sh b/tools/lint/tests/shunit2/list.sh new file mode 100755 index 0000000..d64503a --- /dev/null +++ b/tools/lint/tests/shunit2/list.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +LIST_BASE="List of the loaded models: + i ietf-yang-metadata@2016-08-05 + I yang@2022-06-16 + i ietf-inet-types@2013-07-15 + i ietf-yang-types@2013-07-15 + I ietf-yang-schema-mount@2019-01-14 + i ietf-yang-structure-ext@2020-06-17" + +testListEmptyContext() { + output=`${YANGLINT} -l` + assertEquals "Unexpected list of modules in empty context." "${LIST_BASE}" "${output}" +} + +testListAllImplemented() { + LIST_BASE_ALLIMPLEMENTED="List of the loaded models: + I ietf-yang-metadata@2016-08-05 + I yang@2022-06-16 + I ietf-inet-types@2013-07-15 + I ietf-yang-types@2013-07-15 + I ietf-yang-schema-mount@2019-01-14 + I ietf-yang-structure-ext@2020-06-17" + output=`${YANGLINT} -lii` + assertEquals "Unexpected list of modules in empty context with -ii." "${LIST_BASE_ALLIMPLEMENTED}" "${output}" +} + +. shunit2 |