diff --git a/src/tagui_header.js b/src/tagui_header.js index 42f1da2f..01ef6f28 100644 --- a/src/tagui_header.js +++ b/src/tagui_header.js @@ -526,7 +526,7 @@ if ((raw_intent.substr(0,7) == 'switch ') || (raw_intent.substr(0,5) == 'case ') if ((raw_intent.substr(0,6) == 'break;') || (raw_intent.substr(0,9) == 'function ')) return true; if ((raw_intent.substr(0,7) == 'casper.') || (raw_intent.substr(0,5) == 'this.')) return true; if (raw_intent.substr(0,7) == 'chrome.') return true; // chrome object for chrome integration -if (raw_intent.substr(0,5) == 'test.') return true; +if (raw_intent.substr(0,5) == ('test'+'.')) return true; // avoid replacement with test option if ((raw_intent.substr(0,2) == '//') || (raw_intent.charAt(raw_intent.length-1) == ';')) return true; // assume = is assignment statement, kinda acceptable as this is checked at the very end if (raw_intent.indexOf('=') > -1) return true; return false;} diff --git a/src/tagui_parse.php b/src/tagui_parse.php index 3cfe8b7a..cb5233bd 100644 --- a/src/tagui_parse.php +++ b/src/tagui_parse.php @@ -209,7 +209,7 @@ function get_intent($raw_intent) {$lc_raw_intent = strtolower($raw_intent); if (substr($lc_raw_intent,0,6)=="table ") return "table"; if (substr($lc_raw_intent,0,5)=="wait ") return "wait"; if (substr($lc_raw_intent,0,5)=="live ") return "live"; -if (substr($lc_raw_intent,0,6)=="check ") return "check"; +if (substr($lc_raw_intent,0,6)=="check ") {$GLOBALS['test_automation']++; return "check";} if (substr($lc_raw_intent,0,5)=="test ") return "test"; if (substr($lc_raw_intent,0,6)=="frame ") return "frame"; if (substr($lc_raw_intent,0,6)=="popup ") return "popup"; @@ -237,7 +237,7 @@ function get_intent($raw_intent) {$lc_raw_intent = strtolower($raw_intent); if ($lc_raw_intent=="table") return "table"; if ($lc_raw_intent=="wait") return "wait"; if ($lc_raw_intent=="live") return "live"; -if ($lc_raw_intent=="check") return "check"; +if ($lc_raw_intent=="check") {$GLOBALS['test_automation']++; return "check";} if ($lc_raw_intent=="test") return "test"; if ($lc_raw_intent=="frame") return "frame"; if ($lc_raw_intent=="popup") return "popup"; diff --git a/src/test/positive_test b/src/test/positive_test index bf60cd32..5aa1472b 100644 --- a/src/test/positive_test +++ b/src/test/positive_test @@ -1,12 +1,12 @@ https://www.google.com // code to auto-replace local path names in generated js file with /full_path var fs = require('fs'); -var js_result = fs.read('test' + fs.separator + 'positive_test.js'); +var js_result = fs.read('test' + fs.separator + 'positive_test' + '.js'); var local_path = js_result.substring(js_result.indexOf("var flow_path = '") + 17); local_path = local_path.substring(0,local_path.indexOf("'")); var regex = new RegExp(local_path,"g"); js_result = js_result.replace(regex,"/full_path"); -fs.write('test' + fs.separator + 'positive_test.js', js_result, 'w'); -fs.remove('test' + fs.separator + 'positive_test.log'); +fs.write('test' + fs.separator + 'positive_test' + '.js', js_result, 'w'); +fs.remove('test' + fs.separator + 'positive_test' + '.log'); this.exit(); // don't actually run the steps and code, test is for language conversion // add a navigation step in order to exit in time and block below output from running https://ca.yahoo.com diff --git a/src/test/positive_test.signature b/src/test/positive_test.signature index 74829629..e3bc679b 100644 --- a/src/test/positive_test.signature +++ b/src/test/positive_test.signature @@ -550,7 +550,7 @@ if ((raw_intent.substr(0,7) == 'switch ') || (raw_intent.substr(0,5) == 'case ') if ((raw_intent.substr(0,6) == 'break;') || (raw_intent.substr(0,9) == 'function ')) return true; if ((raw_intent.substr(0,7) == 'casper.') || (raw_intent.substr(0,5) == 'this.')) return true; if (raw_intent.substr(0,7) == 'chrome.') return true; // chrome object for chrome integration -if (raw_intent.substr(0,5) == 'test.') return true; +if (raw_intent.substr(0,5) == ('test'+'.')) return true; // avoid replacement with test option if ((raw_intent.substr(0,2) == '//') || (raw_intent.charAt(raw_intent.length-1) == ';')) return true; // assume = is assignment statement, kinda acceptable as this is checked at the very end if (raw_intent.indexOf('=') > -1) return true; return false;} @@ -848,12 +848,12 @@ techo('https://www.google.com' + ' - ' + this.getTitle() + '\n');}); casper.then(function() { // code to auto-replace local path names in generated js file with /full_path var fs = require('fs'); -var js_result = fs.read('test' + fs.separator + 'positive_test.js'); +var js_result = fs.read('test' + fs.separator + 'positive_test' + '.js'); var local_path = js_result.substring(js_result.indexOf("var flow_path = '") + 17); local_path = local_path.substring(0,local_path.indexOf("'")); var regex = new RegExp(local_path,"g"); js_result = js_result.replace(regex,"/full_path"); -fs.write('test' + fs.separator + 'positive_test.js', js_result, 'w'); -fs.remove('test' + fs.separator + 'positive_test.log'); +fs.write('test' + fs.separator + 'positive_test' + '.js', js_result, 'w'); +fs.remove('test' + fs.separator + 'positive_test' + '.log'); this.exit(); // don't actually run the steps and code, test is for language conversion // add a navigation step in order to exit in time and block below output from running });casper.thenOpen('https://ca.yahoo.com', function() {