ui-redirect.exp revision 1.6
1# Copyright (C) 2010-2016 Free Software Foundation, Inc. 2 3# This program is free software; you can redistribute it and/or modify 4# it under the terms of the GNU General Public License as published by 5# the Free Software Foundation; either version 3 of the License, or 6# (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program. If not, see <http://www.gnu.org/licenses/>. 15 16if { [prepare_for_testing ui-redirect.exp ui-redirect start.c] } { 17 return -1 18} 19 20gdb_breakpoint main 21 22set test "commands" 23gdb_test_multiple $test $test { 24 -re "End with a line saying just \"end\"\\.\r\n>$" { 25 pass $test 26 } 27} 28 29set test "print 1" 30gdb_test_multiple $test $test { 31 -re "\r\n>$" { 32 pass $test 33 } 34} 35gdb_test_no_output "end" 36 37gdb_test_no_output "set logging file /dev/null" 38gdb_test "set logging on" "Copying output to /dev/null\\." 39gdb_test "save breakpoints /dev/null" "Saved to file '/dev/null'\\." 40gdb_test "set logging off" "Done logging to /dev/null\\." 41gdb_test "help" "List of classes of commands:.*" 42