#!/usr/bin/expect -f # This file is part of Firejail project # Copyright (C) 2014-2021 Firejail Authors # License GPL v2 set timeout 10 spawn $env(SHELL) match_max 100000 send -- "firejail --shell=none\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "shell=none configured, but no program specified" } sleep 1 send -- "firejail --profile=shell-none.profile\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "shell=none configured, but no program specified" } after 100 send -- "firejail --shell=none ls\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "Child process initialized" } expect { timeout {puts "TESTING ERROR 3\n";exit} "environment.sh" } after 100 send -- "firejail --profile=shell-none.profile ls\r" expect { timeout {puts "TESTING ERROR 4\n";exit} "Child process initialized" } expect { timeout {puts "TESTING ERROR 5\n";exit} "environment.sh" } after 100 puts "\nall done\n"