Add regression test for CallDepthOverflow

This commit is contained in:
Andrew Schwartzmeyer committed 2016-05-19 10:48:02 -07:00
1 parent 99402343fc
commit ee582d42d5
1 file changed
+20
+20
View File
@@ -142,4 +142,24 @@ Describe "ConsoleHost unit tests" {
EnsureChildHasExited $process
}
}
Context "Exception handling" {
It "Should handle a CallDepthOverflow" {
# Infinite recursion
function recurse
{
recurse $args
}
try
{
recurse "args"
Throw "Incorrect exception"
}
catch
{
$_.FullyQualifiedErrorId | Should Be "CallDepthOverflow"
}
}
}
}