#!/usr/bin/expect -f

set timeout 1

spawn $env(YANGLINT)
expect -exact "> "
send -- "list\r"
expect {
	"list\r
List of the loaded models:\r
    i ietf-yang-metadata@2016-08-05\r
    I yang@2021-04-07\r
    i ietf-inet-types@2013-07-15\r
    i ietf-yang-types@2013-07-15\r
    I ietf-datastores@2018-02-14\r
    I ietf-yang-library@2019-01-04\r
> " { }
	timeout { exit 1 }
}
send -- "exit\r"
expect eof
