From 8712cf23f0ebf5323f546a6b6363a27d12461b2d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:55:11 +0200 Subject: Adding debian version 2.1.30-2. Signed-off-by: Daniel Baumann --- debian/tests/yanglint | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 debian/tests/yanglint (limited to 'debian/tests/yanglint') diff --git a/debian/tests/yanglint b/debian/tests/yanglint new file mode 100755 index 0000000..eda5573 --- /dev/null +++ b/debian/tests/yanglint @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +# Setup the test file +trap 'rm -f "${TESTFILE}"; rmdir "${TESTDIR}"' EXIT +TESTDIR=$(mktemp -d /tmp/yanglint.XXXXXX) +TESTFILE="${TESTDIR}/ietf-interfaces.yang" + +# Unpack or copy the test file +if test -f /usr/share/doc/libyang2-tools/examples/ietf-interfaces.yang.gz; then + gunzip -c < /usr/share/doc/libyang2-tools/examples/ietf-interfaces.yang.gz > "${TESTFILE}" +else + cp /usr/share/doc/libyang2-tools/examples/ietf-interfaces.yang "${TESTFILE}" +fi + +# Lint the test file +yanglint "${TESTFILE}" -- cgit v1.2.3