Limit CLI input redirect nesting
FossilOrigin-Name: 7a073931752d16ba71f1a606091461e427ca5ccf4d135d3c5141bfdd4e67e2d5
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
# shell4-1.*: Basic tests specific to the "stats" command.
|
||||
# shell4-2.*: Basic tests for ".trace"
|
||||
# shell4-3.*: The ".read" command takes the shell out of interactive mode
|
||||
# shell4-4.*: Input redirects cannot recurse too much
|
||||
#
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -138,4 +139,11 @@ do_test shell4-3.2 {
|
||||
exec $::CLI :memory: --interactive ".read t1.txt"
|
||||
} {pound: £}
|
||||
|
||||
do_test shell4-4.1 {
|
||||
set fd [open t1.txt wb]
|
||||
puts $fd ".read t1.txt"
|
||||
close $fd
|
||||
catchcmd ":memory:" ".read t1.txt"
|
||||
} {1 {Input nesting limit (25) reached at line 1. Watch recursion.}}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user