1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 03:32:49 +01:00
RIOT/tests/pkg/qr-code-generator/tests/01-run.py

50 lines
3.1 KiB
Python
Executable File

#!/usr/bin/env python3
# Copyright (C) 2021 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run
QR_CODE = (
"██████████████ ██████████ ██ ██████████████\n"
"██ ██ ██ ██ ████ ██ ██\n"
"██ ██████ ██ ████ ██ ████ ██ ██████ ██\n"
"██ ██████ ██ ████ ██ ██ ██████ ██\n"
"██ ██████ ██ ██████████ ████ ██ ██████ ██\n"
"██ ██ ██ ██ ████ ██ ██\n"
"██████████████ ██ ██ ██ ██ ██ ██████████████\n"
" ██ ██████ ██ \n"
" ████ ██ ████ ██████ ██████ ██ ██████████\n"
" ████ ██ ████████ ██ ████ ██\n"
" ██ ████████ ██ ██ ████ ██████\n"
"██████ ██ ██ ██ ██ ██ ██ \n"
" ████████ ██ ██ ██████ ██ ████\n"
" ██ ████ ██ ██ ██████ ██ ██\n"
"██ ██ ██ ████████ ██ ██ ██████\n"
" ██ ████ ████ ██ ██ ██ ██ ██ \n"
"██ ██ ██████ ████████████████ \n"
" ██████ ██ ████ ████ ████\n"
"██████████████ ████████ ████████ ██ ████ ████\n"
"██ ██ ██ ██████ ██ ████ ██\n"
"██ ██████ ██ ██████████ ████████████ ██\n"
"██ ██████ ██ ████ ██ ██ ████████ \n"
"██ ██████ ██ ██ ████ ██ ██ ██ ██\n"
"██ ██ ████ ██████████ ████ ██ \n"
"██████████████ ██ ██ ████ ████\n"
)
def testfunc(child):
for line in QR_CODE.split("\n"):
child.expect_exact(line)
print("\nSUCCESS")
if __name__ == "__main__":
sys.exit(run(testfunc))