aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/bestPractice/Sbp_12.6.2_A13_T3.js')
-rw-r--r--test/suite/bestPractice/Sbp_12.6.2_A13_T3.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
new file mode 100644
index 000000000..17bfdab66
--- /dev/null
+++ b/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * FunctionDeclaration within a "while" Statement is not allowed
+ *
+ * @path bestPractice/Sbp_12.6.2_A13_T3.js
+ * @description Checking if declaring a function within a "while" Statement that is in a function body leads to an exception
+ * @negative
+ */
+
+function(){
+
+while(0){
+ function __func(){};
+};
+
+};
+