File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -646,6 +646,24 @@ fn performance_nested_lists() -> TestResult {
646646 fail_test ( r#"[[[[[[[[[[[[[[[[[[[[[[[[[[[["# , "Unexpected end of code" )
647647}
648648
649+ #[ test]
650+ fn performance_nested_modules ( ) -> TestResult {
651+ // Parser used to be exponential on deeply nested modules
652+ // TODO: Add a timeout
653+ fail_test (
654+ r#"module foo {
655+ module foo { module foo { module foo { module foo {
656+ module foo { module foo { module foo { module foo {
657+ module foo { module foo { module foo { module foo {
658+ module foo { module foo { module foo { module foo {
659+ module foo { module foo { module foo { module foo {
660+ module foo { module foo { module foo { module foo {
661+ module foo { module foo { module foo { module foo {
662+ use bar.nu }}}}}}}}}}}}}}}}}}}}}}}}}}}}"# ,
663+ "module bar.nu not found" ,
664+ )
665+ }
666+
649667#[ test]
650668fn unary_not_1 ( ) -> TestResult {
651669 run_test ( r#"not false"# , "true" )
You can’t perform that action at this time.
0 commit comments