From cd07912073c951b4bbb871ed2653af1be2cfc714 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:55:11 +0200 Subject: Adding upstream version 2.1.30. Signed-off-by: Daniel Baumann --- tools/lint/tests/shunit2/list.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tools/lint/tests/shunit2/list.sh (limited to 'tools/lint/tests/shunit2/list.sh') 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 -- cgit v1.2.3