Best JavaScript code snippet using qawolf
regress-302439.js
Source:regress-302439.js
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */2/* ***** BEGIN LICENSE BLOCK *****3 * Version: MPL 1.1/GPL 2.0/LGPL 2.14 *5 * The contents of this file are subject to the Mozilla Public License Version6 * 1.1 (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * http://www.mozilla.org/MPL/9 *10 * Software distributed under the License is distributed on an "AS IS" basis,11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License12 * for the specific language governing rights and limitations under the13 * License.14 *15 * The Original Code is JavaScript Engine testing utilities.16 *17 * The Initial Developer of the Original Code is18 * Mozilla Foundation.19 * Portions created by the Initial Developer are Copyright (C) 200520 * the Initial Developer. All Rights Reserved.21 *22 * Contributor(s): Silviu Trasca23 *24 * Alternatively, the contents of this file may be used under the terms of25 * either the GNU General Public License Version 2 or later (the "GPL"), or26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),27 * in which case the provisions of the GPL or the LGPL are applicable instead28 * of those above. If you wish to allow use of your version of this file only29 * under the terms of either the GPL or the LGPL, and not to allow others to30 * use your version of this file under the terms of the MPL, indicate your31 * decision by deleting the provisions above and replace them with the notice32 * and other provisions required by the GPL or the LGPL. If you do not delete33 * the provisions above, a recipient may use your version of this file under34 * the terms of any one of the MPL, the GPL or the LGPL.35 *36 * ***** END LICENSE BLOCK ***** */37var gTestfile = 'regress-302439.js';38//-----------------------------------------------------------------------------39var BUGNUMBER = 302439;40var summary = 'spandep fu should skip unused JSOP_TABLESWITCH jump table entries';41var actual = 'No Crash';42var expect = 'No Crash';43printBugNumber(BUGNUMBER);44printStatus (summary);45function productList(catID,famID) {46 clearBox(document.Support_Form.Product_ID);47 switch(parseInt(catID)) {48 case 1 : // Sound Blaster49 switch(parseInt(famID)) {50 case 434 : // Audigy 451 break;52 case 204 : // Audigy 253 break;54 case 205 : // Audigy55 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Platinum eX', '45'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //56 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Platinum', '4846'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //57 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy LS (SE)', '10365'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //58 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Digital Entertainment', '5085'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //59 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy ES', '5086'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //60 break;61 case 206 : // Live!62 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 24-bit External', '10702'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //63 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! MP3+ 5.1', '573'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //64 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 5.1', '50'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //65 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Digital Entertainment 5.1 (SE)', '4855'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //66 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Platinum 5.1', '572'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //67 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! 5.1 Digital (Dell)', '1853'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //68 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Platinum', '3203'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //69 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! Value', '4856'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //70 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live!', '4857'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //71 break;72 case 207 : // Others73 try { addBoxItem(document.Support_Form.Product_ID, 'Extigy', '585'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //74 try { addBoxItem(document.Support_Form.Product_ID, 'Ensoniq AudioPCI', '420'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //75 try { addBoxItem(document.Support_Form.Product_ID, 'PCI4.1 Digital', '681'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //76 try { addBoxItem(document.Support_Form.Product_ID, 'Vibra128 4D', '9032'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //77 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music', '154'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //78 try { addBoxItem(document.Support_Form.Product_ID, 'Vibra 128', '4851'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //79 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster 32', '1844'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //80 try { addBoxItem(document.Support_Form.Product_ID, 'SB AWE64 Digital', '1821'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //81 try { addBoxItem(document.Support_Form.Product_ID, 'SB PCI 5.1', '1828'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //82 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster\u00AE', '1841'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //83 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster\u00AE 16', '1842'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //84 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster 16 Wave Effects', '1843'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //85 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE32', '1848'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //86 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE64', '1849'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //87 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE64 Gold', '1850'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //88 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Microchannels', '1861'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //89 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster PCI 128', '1864'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //90 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster PCI 64', '1865'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //91 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Pro', '1866'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //92 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audio PCI', '1559'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //93 break;94 case 16 : // Accessories95 try { addBoxItem(document.Support_Form.Product_ID, 'Live!Drive II', '9278'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //96 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster MIDI Adapter', '251'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //97 try { addBoxItem(document.Support_Form.Product_ID, 'Mini to Standard MIDI Adapter', '252'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //98 break;99 }100 break;101 case 210 : // Portable Media Players102 switch(parseInt(famID)) {103 case 211 : // Zen104 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Portable Media Center', '9882'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //105 break;106 case 212 : // Accessories107 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Docking Station', '10756'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //108 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Li-ion Polymer Battery', '10679'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //109 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC FM Wired Remote', '10663'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //110 break;111 }112 break;113 case 213 : // MP3 Players114 switch(parseInt(famID)) {115 case 214 : // Zen116 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Touch', '10274'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //117 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Micro', '10795'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //118 try { addBoxItem(document.Support_Form.Product_ID, 'Zen', '11519'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //119 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Xtra', '9288'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //120 try { addBoxItem(document.Support_Form.Product_ID, 'Zen NX', '4836'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //121 try { addBoxItem(document.Support_Form.Product_ID, 'Zen USB 2.0', '9019'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //122 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Zen', '117'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //123 break;124 case 215 : // MuVo125 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Micro N200', '10737'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //126 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo\u00B2 X-Trainer', '5080'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //127 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Slim', '10052'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //128 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Sport C100', '10794'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //129 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo V200', '10732'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //130 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo TX FM', '9771'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //131 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo USB 2.0', '10919'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //132 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo', '110'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //133 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo NX', '4884'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //134 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo\u00B2', '4908'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //135 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo TX', '9672'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //136 break;137 case 216 : // Digital MP3 Player138 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Xtra', '9288'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //139 try { addBoxItem(document.Support_Form.Product_ID, 'Rhomba NX', '10302'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //140 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player FX120', '11010'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //141 try { addBoxItem(document.Support_Form.Product_ID, 'DXT 200', '4996'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //142 try { addBoxItem(document.Support_Form.Product_ID, 'Zen USB 2.0', '9019'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //143 try { addBoxItem(document.Support_Form.Product_ID, 'Jukebox 3', '296'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //144 try { addBoxItem(document.Support_Form.Product_ID, 'Creative CD-MP3 Slim 600', '1582'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //145 try { addBoxItem(document.Support_Form.Product_ID, 'Zen NX', '4836'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //146 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player', '4983'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //147 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player 2', '4984'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //148 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player MX', '4985'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //149 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Zen', '117'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //150 try { addBoxItem(document.Support_Form.Product_ID, 'JukeBox 2', '239'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //151 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox', '241'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //152 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox C', '242'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //153 try { addBoxItem(document.Support_Form.Product_ID, 'Jukebox 10GB', '261'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //154 try { addBoxItem(document.Support_Form.Product_ID, 'Creative CD-MP3 M100', '264'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //155 break;156 case 217 : // Accessories157 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Micro Battery', '11215'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //158 try { addBoxItem(document.Support_Form.Product_ID, 'Universal Travel Adapter for Zen Micro', '11711'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //159 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Stik-On', '12982'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //160 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Universal Travel Adapter', '12979'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //161 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case', '11511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //162 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Leather Case', '12978'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //163 try { addBoxItem(document.Support_Form.Product_ID, 'Home Kit - Jukebox 3', '497'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //164 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox 3 Leather Case', '498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //165 try { addBoxItem(document.Support_Form.Product_ID, 'Faceplates - Jukebox 3', '499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //166 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Armband', '511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //167 try { addBoxItem(document.Support_Form.Product_ID, 'NOMAD II MG Wired Remote', '515'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //168 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Accessory Kit', '533'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //169 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Charger Kit', '538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //170 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Pack', '539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //171 try { addBoxItem(document.Support_Form.Product_ID, 'NOMAD II MG Travel Cable', '560'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //172 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case - Jukebox 2', '562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //173 try { addBoxItem(document.Support_Form.Product_ID, 'Battery - Jukebox 2', '563'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //174 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Battery Modules', '999'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //175 try { addBoxItem(document.Support_Form.Product_ID, 'PlayDock PD200', '31'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //176 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound', '80'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //177 try { addBoxItem(document.Support_Form.Product_ID, 'Li-Ion Battery - Jukebox 3', '86'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //178 try { addBoxItem(document.Support_Form.Product_ID, 'FM Wired Remote - Jukebox 3/Jukebox Zen/MuVo\u00B2', '115'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //179 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Power Adapter', '125'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //180 try { addBoxItem(document.Support_Form.Product_ID, 'Cassette Adapter Kit', '401'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //181 try { addBoxItem(document.Support_Form.Product_ID, 'Car Kit - Jukebox 3/Jukebox 2/Jukebox Zen/MuVo\u00B2', '496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //182 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Pack', '4997'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //183 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Modules - MuVo NX / TX / TX FM', '9217'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //184 try { addBoxItem(document.Support_Form.Product_ID, 'Armband - MuVo NX / TX / TX FM', '10126'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //185 break;186 }187 break;188 case 4 : // Speaker Systems189 switch(parseInt(famID)) {190 case 113 : // 7.1 Systems191 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T7700', '5076'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //192 break;193 case 24 : // 6.1 Systems194 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 6.1 6600', '465'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //195 break;196 case 25 : // 5.1 Systems197 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5100', '1704'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //198 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks LX520', '9412'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //199 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 5600', '10736'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //200 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T5900', '10323'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //201 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire P5800', '10596'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //202 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT2200', '428'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //203 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5.1 5700 Digital', '439'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //204 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 Digital 5500', '990'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //205 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5.1 5200', '55'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //206 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5300', '238'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //207 try { addBoxItem(document.Support_Form.Product_ID, 'MegaWorks THX 5.1 550', '240'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //208 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT3500 Digital', '290'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //209 try { addBoxItem(document.Support_Form.Product_ID, 'PlayWorks DTT2500 Digital', '291'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //210 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5600', '1705'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //211 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T5400', '5077'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //212 try { addBoxItem(document.Support_Form.Product_ID, 'PlayWorks PS2000 Digital', '427'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //213 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1', '1628'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //214 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT2500 Digital', '1629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //215 try { addBoxItem(document.Support_Form.Product_ID, 'Cambridge SoundWorks MegaWorks 510D', '478'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //216 break;217 case 26 : // 4.1 Systems218 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1600', '47'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //219 try { addBoxItem(document.Support_Form.Product_ID, 'FPS2000 Digital', '297'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //220 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 4.1 4400', '446'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //221 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1800', '424'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //222 try { addBoxItem(document.Support_Form.Product_ID, 'PC-Works FourPointSurround FPS1000', '378'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //223 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1500', '388'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //224 break;225 case 27 : // 2.1 Systems226 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 3600', '10735'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //227 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T3000', '10329'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //228 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 3400', '10733'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //229 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire G380', '9276'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //230 try { addBoxItem(document.Support_Form.Product_ID, 'Creative I-Trigue 3200', '10327'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //231 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks LX220', '9407'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //232 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 2.1 Slim 2600', '434'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //233 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2.1 2500', '461'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //234 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue L3500', '4912'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //235 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue L3450', '4913'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //236 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T2900', '9025'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //237 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire P380', '9026'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //238 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks SW320', '48'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //239 try { addBoxItem(document.Support_Form.Product_ID, 'MegaWorks THX 2.1 250D', '124'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //240 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 2.1 3300', '139'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //241 try { addBoxItem(document.Support_Form.Product_ID, 'Creative SBS 2.1 350 Speakers', '281'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //242 try { addBoxItem(document.Support_Form.Product_ID, 'SBS 370', '283'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //243 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks', '284'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //244 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire Slim 500', '289'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //245 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 2.1 2400', '298'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //246 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks Digital', '299'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //247 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks SW310', '304'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //248 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue i3350', '279'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //249 break;250 case 28 : // 2.0 Systems251 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire Monitor M85-D', '4910'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //252 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2.0 1300', '4918'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //253 try { addBoxItem(document.Support_Form.Product_ID, 'SBS 230 Speakers', '4905'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //254 try { addBoxItem(document.Support_Form.Product_ID, 'SBS52', '1'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //255 try { addBoxItem(document.Support_Form.Product_ID, 'SBS16', '2'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //256 try { addBoxItem(document.Support_Form.Product_ID, 'Cambridge SBS20', '3'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //257 try { addBoxItem(document.Support_Form.Product_ID, 'SBS50', '1834'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //258 try { addBoxItem(document.Support_Form.Product_ID, 'SBS10', '1831'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //259 try { addBoxItem(document.Support_Form.Product_ID, 'Creative SBS15', '4906'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //260 break;261 case 29 : // Portable Systems262 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound 200', '10164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //263 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound MP3', '1874'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //264 try { addBoxItem(document.Support_Form.Product_ID, 'PlayDock PD200', '31'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //265 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound', '80'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //266 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound i-300', '9022'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //267 try { addBoxItem(document.Support_Form.Product_ID, 'Creative TravelSound MP3 Titanium', '991'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //268 break;269 case 136 : // Decoders270 try { addBoxItem(document.Support_Form.Product_ID, 'Decoder DDTS-100', '9468'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //271 break;272 case 30 : // Accessories273 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1100 Speaker Stands', '166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //274 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //275 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1300', '4936'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //276 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HN-505', '4938'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //277 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-65', '4916'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //278 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-60', '4937'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //279 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //280 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-480', '11708'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //281 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //282 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HS-300', '4939'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //283 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1200 Speaker Stands', '9515'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //284 try { addBoxItem(document.Support_Form.Product_ID, 'SurroundStation', '32'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //285 try { addBoxItem(document.Support_Form.Product_ID, 'Creative HQ-2000 Headphones', '4'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //286 try { addBoxItem(document.Support_Form.Product_ID, 'MT-500 Speaker Tripods', '399'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //287 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2600 Spkr Grilles', '636'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //288 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5300 Spkr Grilles', '637'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //289 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5700 Spkr Grilles', '664'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //290 try { addBoxItem(document.Support_Form.Product_ID, 'Creative HQ-1000 Headphones', '4988'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //291 break;292 }293 break;294 case 218 : // Web Cameras295 switch(parseInt(famID)) {296 case 219 : // WebCam297 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra for Notebooks', '11491'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //298 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra', '10451'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //299 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Pro', '10450'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //300 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live!', '10412'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //301 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Instant', '10410'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //302 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX Ultra', '9340'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //303 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX Pro', '628'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //304 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX', '627'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //305 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam PRO eX', '243'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //306 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam PRO', '616'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //307 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go Plus', '15'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //308 try { addBoxItem(document.Support_Form.Product_ID, 'Webcam Go ES', '1898'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //309 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go Mini', '1900'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //310 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go', '17'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //311 try { addBoxItem(document.Support_Form.Product_ID, 'Video Blaster WebCam Plus', '16'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //312 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Notebook', '629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //313 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Mobile', '4890'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //314 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam 5', '1896'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //315 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista Pro', '11053'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //316 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista Plus', '11043'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //317 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam', '65'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //318 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam II', '4900'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //319 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam 3', '1908'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //320 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista', '1907'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //321 break;322 case 220 : // PC-CAM323 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 900', '10119'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //324 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 930 Slim', '11431'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //325 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 920 Slim', '10823'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //326 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 880', '308'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //327 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 750', '4878'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //328 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 850', '4879'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //329 try { addBoxItem(document.Support_Form.Product_ID, 'Creative PC-CAM 300', '49'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //330 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 350', '106'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //331 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 550', '107'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //332 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam Value', '116'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //333 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 600', '260'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //334 break;335 }336 break;337 case 437 : // Headphones & Headsets338 switch(parseInt(famID)) {339 case 438 : // Headphones340 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //341 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1300', '4936'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //342 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //343 break;344 case 439 : // Noise-Cancelling Headphones345 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HN-505', '4938'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //346 break;347 case 440 : // Backphones348 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-65', '4916'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //349 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-60', '4937'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //350 break;351 case 441 : // Earphones352 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //353 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-630', '11397'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //354 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-480', '11708'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //355 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-380', '11229'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //356 break;357 case 442 : // Headsets358 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //359 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HS-300', '4939'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //360 break;361 }362 break;363 case 9 : // Storage Devices364 switch(parseInt(famID)) {365 case 259 : // DVD±RW Drive366 try { addBoxItem(document.Support_Form.Product_ID, 'DVD±RW Dual 8X', '9599'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //367 try { addBoxItem(document.Support_Form.Product_ID, 'DVD±RW Dual 8x8', '10305'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //368 try { addBoxItem(document.Support_Form.Product_ID, 'DVD+RW Dual External 8x8', '10583'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //369 break;370 case 47 : // Combo Drive371 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive 52.32.52x/16x', '11712'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //372 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive 40-12-40/16', '4998'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //373 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive NS', '9454'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //374 break;375 case 46 : // CD-RW Drive376 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW External 52-32-52x', '9481'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //377 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 12-10-32', '8'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //378 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW 52.24.52', '1590'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //379 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 24-10-40 External', '4944'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //380 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW External 52-24-52x', '9027'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //381 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW 52-32-52x', '9453'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //382 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 48-12-48 External', '9020'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //383 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 48-12-48', '4941'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //384 break;385 case 45 : // PC-DVD Drive386 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD Encore 12x', '6'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //387 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD ROM 12x', '1486'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //388 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD DVD-ROM 16x', '1490'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //389 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD MPEG-1 Decoder Board', '1801'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //390 break;391 case 44 : // CD-ROM Drive392 try { addBoxItem(document.Support_Form.Product_ID, 'CD-ROM Blaster Digital iR52X', '3562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //393 try { addBoxItem(document.Support_Form.Product_ID, 'CD-ROM Blaster 52X', '11'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //394 try { addBoxItem(document.Support_Form.Product_ID, '12x CD-ROM Drives', '1485'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //395 try { addBoxItem(document.Support_Form.Product_ID, '16x CD-ROM Drives', '1489'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //396 try { addBoxItem(document.Support_Form.Product_ID, '48x CD-ROM Drives', '1548'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //397 try { addBoxItem(document.Support_Form.Product_ID, '1x & 2x CD-ROM Drives', '1493'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //398 try { addBoxItem(document.Support_Form.Product_ID, '24x CD-ROM Drives', '1495'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //399 try { addBoxItem(document.Support_Form.Product_ID, '2x & 3x CD-ROM (SCSI)', '1496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //400 try { addBoxItem(document.Support_Form.Product_ID, '32x CD-ROM Drives', '1498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //401 try { addBoxItem(document.Support_Form.Product_ID, '36x CD-ROM Drives', '1499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //402 try { addBoxItem(document.Support_Form.Product_ID, '40x CD-Rom Drives', '1547'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //403 try { addBoxItem(document.Support_Form.Product_ID, '4x CD-ROM Drives', '1549'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //404 try { addBoxItem(document.Support_Form.Product_ID, '6x CD-ROM Drives', '1552'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //405 try { addBoxItem(document.Support_Form.Product_ID, '8x CD-ROM Drives', '1554'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //406 break;407 case 49 : // Portable Harddisk408 try { addBoxItem(document.Support_Form.Product_ID, 'Storage Blaster Portable Harddisk', '8996'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //409 break;410 case 265 : // Portable Storage411 try { addBoxItem(document.Support_Form.Product_ID, 'ThumbDrive', '10681'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //412 break;413 }414 break;415 case 12 : // PC Barebone416 switch(parseInt(famID)) {417 case 54 : // SLiX PC418 try { addBoxItem(document.Support_Form.Product_ID, 'SLiX PC MPC61Y0', '11766'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //419 break;420 }421 break;422 case 11 : // Monitors423 switch(parseInt(famID)) {424 case 53 : // LCD425 try { addBoxItem(document.Support_Form.Product_ID, '17" TFT LCD Monitor With DVI', '9980'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //426 break;427 }428 break;429 case 60 : // Video430 switch(parseInt(famID)) {431 case 96 : // Video Editing432 try { addBoxItem(document.Support_Form.Product_ID, 'Video Blaster MovieMaker', '13'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //433 break;434 }435 break;436 case 13 : // Accessories437 switch(parseInt(famID)) {438 case 55 : // Sound Blaster439 try { addBoxItem(document.Support_Form.Product_ID, 'Optical Digital I/O Card II', '30'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //440 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster MIDI Adapter', '251'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //441 try { addBoxItem(document.Support_Form.Product_ID, 'Mini to Standard MIDI Adapter', '252'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //442 try { addBoxItem(document.Support_Form.Product_ID, 'Live!Drive II', '9278'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //443 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audigy Internal Drive', '88'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //444 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audigy External Drive', '89'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //445 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Drive IR', '26'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //446 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Drive I', '27'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //447 try { addBoxItem(document.Support_Form.Product_ID, 'Remote Controller SBLive', '1816'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //448 break;449 case 449 : // Zen Micro450 try { addBoxItem(document.Support_Form.Product_ID, 'Universal Travel Adapter for Zen Micro', '11711'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //451 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case', '11511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //452 break;453 case 483 : // Zen Neeon454 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Stik-On', '12982'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //455 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Leather Case', '12978'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //456 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Universal Travel Adapter', '12979'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //457 break;458 case 264 : // Portable Media Center459 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Docking Station', '10756'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //460 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Li-ion Polymer Battery', '10679'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //461 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC FM Wired Remote', '10663'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //462 break;463 case 57 : // MP3 Players464 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox 3 Car Kit', '4894'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //465 try { addBoxItem(document.Support_Form.Product_ID, 'Home Kit - Jukebox 3', '497'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //466 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox 3 Leather Case', '498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //467 try { addBoxItem(document.Support_Form.Product_ID, 'Faceplates - Jukebox 3', '499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //468 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Armband', '511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //469 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Accessory Kit', '533'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //470 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Charger Kit', '538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //471 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Pack', '539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //472 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case - Jukebox 2', '562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //473 try { addBoxItem(document.Support_Form.Product_ID, 'Battery - Jukebox 2', '563'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //474 try { addBoxItem(document.Support_Form.Product_ID, 'Li-Ion Battery - Jukebox 3', '86'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //475 try { addBoxItem(document.Support_Form.Product_ID, 'FM Wired Remote - Jukebox 3/Jukebox Zen/MuVo\u00B2', '115'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //476 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Power Adapter', '125'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //477 try { addBoxItem(document.Support_Form.Product_ID, 'Cassette Adapter Kit', '401'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //478 try { addBoxItem(document.Support_Form.Product_ID, 'Car Kit - Jukebox 3/Jukebox 2/Jukebox Zen/MuVo\u00B2', '496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //479 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Modules - MuVo NX / TX / TX FM', '9217'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //480 try { addBoxItem(document.Support_Form.Product_ID, 'Armband - MuVo NX / TX / TX FM', '10126'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //481 break;482 case 58 : // Speaker Systems483 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1100 Speaker Stands', '166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //484 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //485 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //486 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //487 try { addBoxItem(document.Support_Form.Product_ID, 'MT-500 Speaker Tripods', '399'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //488 try { addBoxItem(document.Support_Form.Product_ID, 'Speaker Extension Cables', '415'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //489 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5300 Spkr Grilles', '637'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //490 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5700 Spkr Grilles', '664'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //491 break;492 case 256 : // Wireless493 try { addBoxItem(document.Support_Form.Product_ID, 'Wireless Headset for Bluetooth', '10287'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //494 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2455', '11394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //495 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //496 break;497 case 59 : // Storage498 try { addBoxItem(document.Support_Form.Product_ID, 'S-Video Cable Coupler', '250'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //499 try { addBoxItem(document.Support_Form.Product_ID, 'IDE Cable Set', '255'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //500 try { addBoxItem(document.Support_Form.Product_ID, 'Dxr2 Decoder Board', '1648'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //501 try { addBoxItem(document.Support_Form.Product_ID, 'Dxr3 Decoder Card', '12'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //502 break;503 }504 break;505 case 118 : // Digital Cameras506 switch(parseInt(famID)) {507 case 117 : // Digital Still Cameras508 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 4200ZS', '10822'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //509 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 3200Z', '9762'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //510 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 3000Z', '9028'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //511 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam', '120'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //512 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam Value', '116'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //513 break;514 case 309 : // Digital Video Cameras515 try { addBoxItem(document.Support_Form.Product_ID, 'DiVi CAM 316', '11175'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //516 break;517 }518 break;519 case 10 : // Mice & Keyboards520 switch(parseInt(famID)) {521 case 223 : // Wired Mice522 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse 5500', '11387'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //523 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse 3500', '11388'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //524 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Classic', '4919'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //525 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Optical Lite', '4920'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //526 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Optical 3000', '4924'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //527 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Optical Mouse', '262'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //528 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Notebook Optical', '9147'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //529 break;530 case 224 : // Wireless Mice531 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint Travel', '11165'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //532 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint Travel Mini', '11166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //533 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 5500', '11178'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //534 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 3500', '11386'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //535 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 5000', '9145'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //536 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical', '263'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //537 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 3000', '4923'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //538 break;539 case 227 : // Wireless Mice & Keyboards540 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 9000 Pro', '11493'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //541 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 8000', '10104'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //542 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 6000', '5039'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //543 break;544 case 228 : // Wired PC & MIDI Keyboards545 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM', '9389'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //546 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM Value', '9600'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //547 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys', '504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //548 break;549 case 52 : // Gaming Devices550 try { addBoxItem(document.Support_Form.Product_ID, 'Avant Force NX', '9394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //551 try { addBoxItem(document.Support_Form.Product_ID, 'Cobra Force 3D', '9396'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //552 try { addBoxItem(document.Support_Form.Product_ID, 'Gamepad I', '1658'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //553 break;554 }555 break;556 case 8 : // Musical Keyboards557 switch(parseInt(famID)) {558 case 234 : // PC & MIDI Keyboards559 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM', '9389'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //560 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM Value', '9600'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //561 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys', '504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //562 break;563 case 231 : // MIDI Keyboards564 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Blasterkeys', '40'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //565 break;566 }567 break;568 case 237 : // Creative Professional569 switch(parseInt(famID)) {570 case 239 : // Digital Audio Systems571 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1820M', '10496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //572 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1212M', '10500'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //573 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1820', '10494'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //574 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 0404', '10498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //575 break;576 case 240 : // Desktop Sampling Systems577 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X', '10502'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //578 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X Studio', '10504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //579 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X', '11074'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //580 break;581 case 421 : // Desktop Sound Modules582 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X', '11074'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //583 break;584 case 258 : // Accessories and Upgrades585 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X Software Upgrade', '11073'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //586 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X OS Upgrade', '10225'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //587 try { addBoxItem(document.Support_Form.Product_ID, 'Mo\'Phatt X', '11329'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //588 try { addBoxItem(document.Support_Form.Product_ID, 'Planet Earth X', '11330'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //589 try { addBoxItem(document.Support_Form.Product_ID, 'Virtuoso X', '11332'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //590 try { addBoxItem(document.Support_Form.Product_ID, 'Vintage X Pro Collection', '11072'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //591 try { addBoxItem(document.Support_Form.Product_ID, 'Street Kits', '11331'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //592 try { addBoxItem(document.Support_Form.Product_ID, 'AudioDock M', '10229'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //593 try { addBoxItem(document.Support_Form.Product_ID, 'Audio Dock', '10230'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //594 try { addBoxItem(document.Support_Form.Product_ID, 'Beat Shop 2', '10404'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //595 try { addBoxItem(document.Support_Form.Product_ID, 'EDI Cable', '10227'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //596 try { addBoxItem(document.Support_Form.Product_ID, 'Sync Daughter Card', '10576'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //597 break;598 }599 break;600 case 243 : // Wireless601 switch(parseInt(famID)) {602 case 246 : // Mice & Keyboards603 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 5500', '11178'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //604 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 3500', '11386'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //605 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 5000', '9145'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //606 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 8000', '10104'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //607 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 6000', '5039'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //608 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical', '263'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //609 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 3000', '4923'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //610 break;611 case 248 : // Accessories612 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2460', '11238'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //613 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2455', '11394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //614 try { addBoxItem(document.Support_Form.Product_ID, 'Wireless Headset for Bluetooth', '10287'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //615 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //616 break;617 }618 break;619 case 244 : // Notebook Products620 switch(parseInt(famID)) {621 case 250 : // PCMCIA Sound Blaster622 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy 2 ZS Notebook', '10769'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //623 break;624 case 249 : // USB Sound Blaster625 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy 2 NX', '9103'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //626 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 24-bit External', '10702'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //627 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music LX', '10246'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //628 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music', '154'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //629 try { addBoxItem(document.Support_Form.Product_ID, 'Extigy', '585'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //630 break;631 case 251 : // Portable Speaker Systems632 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound 200', '10164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //633 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound i-300', '9022'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //634 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound MP3', '1874'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //635 break;636 case 252 : // Mice & Keyboards637 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless NoteBook Optical', '10188'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //638 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Notebook Optical', '9147'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //639 break;640 case 253 : // Web Cameras641 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra for Notebooks', '11491'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //642 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Notebook', '629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //643 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Mobile', '4890'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //644 break;645 }646 break;647 case 6 : // Graphics648 switch(parseInt(famID)) {649 case 37 : // ATI Radeon 9000 series650 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RX9250', '11489'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //651 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RX9250 Xtreme', '11490'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //652 break;653 case 230 : // 3D Labs654 try { addBoxItem(document.Support_Form.Product_ID, 'Graphics Blaster Picture Perfect', '164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //655 break;656 case 99 : // NVIDIA GeForce657 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce', '1500'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //658 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce 2', '1501'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //659 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce Pro', '1505'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //660 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce2 ULTRA 64MB AGP', '1512'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //661 break;662 case 98 : // NVIDIA Riva TNT Series663 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RIVA TNT2 Pro', '1527'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //664 try { addBoxItem(document.Support_Form.Product_ID, 'Graphics Blaster RIVA128ZX', '1689'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //665 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Riva TNT2', '4841'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //666 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RIVA TNT2 Value', '4842'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //667 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster TNT2 Ultra', '4843'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //668 break;669 case 73 : // 3D Blaster670 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 Titanium 4200', '1516'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //671 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9700 Pro', '1524'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //672 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX440', '1539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //673 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 64MB', '1540'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //674 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 Pro', '1541'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //675 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX420', '4869'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //676 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9800 Pro', '4917'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //677 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX460', '4969'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //678 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600', '4973'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //679 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 Pro 128MB', '8995'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //680 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9200 SE', '9024'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //681 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 Pro', '9576'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //682 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 XT', '10311'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //683 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 SE', '10335'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //684 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Savage 4', '1536'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //685 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster VLB', '1537'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //686 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Voodoo 2', '1538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //687 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster PCI', '1523'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //688 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Banshee', '1506'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //689 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Banshee AGP', '1507'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //690 break;691 }692 break;693 case 7 : // Modems & Networking694 switch(parseInt(famID)) {695 case 41 : // Wireless696 try { addBoxItem(document.Support_Form.Product_ID, 'USB Adapter CB2431', '10863'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //697 try { addBoxItem(document.Support_Form.Product_ID, 'Network Blaster Wireless PCMCIA Card', '3868'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //698 break;699 case 42 : // Broadband700 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster DSL Router 8015U', '11176'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //701 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster Router 8110', '10280'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //702 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster ADSL Bridge ', '4873'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //703 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster USB Modem', '4871'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //704 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster DSL', '4921'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //705 break;706 case 40 : // Analog707 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCMCIA', '24'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //708 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 PCI', '52'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //709 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 Serial', '258'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //710 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 USB', '266'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //711 try { addBoxItem(document.Support_Form.Product_ID, 'Modem 56k Internal', '1715'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //712 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster Flash 56II ISA', '18'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //713 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 ISA', '19'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //714 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster Flash 56 PCI', '21'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //715 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 USB', '22'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //716 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 External', '23'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //717 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster USB (DE5675)', '8992'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //718 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster USB (DE5673)', '8991'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //719 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5663)', '4999'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //720 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5656)', '8988'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //721 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5655)', '8989'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //722 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster External (DE5625)', '8990'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //723 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster 28.8 External', '5000'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //724 try { addBoxItem(document.Support_Form.Product_ID, 'CT5451 Modem Blaster Voice PnP', '5001'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //725 try { addBoxItem(document.Support_Form.Product_ID, 'Phone Blaster', '1809'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //726 break;727 }728 break;729 case 106 : // Software730 switch(parseInt(famID)) {731 case 241 : // HansVision DXT732 try { addBoxItem(document.Support_Form.Product_ID, 'HansVision DXT 2005 Edition', '12218'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //733 break;734 case 242 : // Children\'s Multimedia Educational735 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Happy Mandarin Series', '11269'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //736 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Happy English Series', '4932'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //737 break;738 case 107 : // HansVision739 try { addBoxItem(document.Support_Form.Product_ID, 'HansVision DXT', '4928'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //740 break;741 case 108 : // WaWaYaYa742 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Comprehensive Ability Series', '4930'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //743 break;744 case 109 : // Others745 break;746 }747 break;748 }749 // addBoxItem(document.Support_Form.Product_ID, 'Zen Portable Media Center', 'DUMMYPREFIX_ZenPMC_Temp|9882');750}751try752{753 productList(0,0);754}755catch(e)756{757}...
perlstress-002.js
Source:perlstress-002.js
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */2/* ***** BEGIN LICENSE BLOCK *****3 * Version: MPL 1.1/GPL 2.0/LGPL 2.14 *5 * The contents of this file are subject to the Mozilla Public License Version6 * 1.1 (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * http://www.mozilla.org/MPL/9 *10 * Software distributed under the License is distributed on an "AS IS" basis,11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License12 * for the specific language governing rights and limitations under the13 * License.14 *15 * The Original Code is JavaScript Engine testing utilities.16 *17 * The Initial Developer of the Original Code is18 * Netscape Communications Corp.19 * Portions created by the Initial Developer are Copyright (C) 200220 * the Initial Developer. All Rights Reserved.21 *22 * Contributor(s):23 * pschwartau@netscape.com, rogerl@netscape.com24 *25 * Alternatively, the contents of this file may be used under the terms of26 * either the GNU General Public License Version 2 or later (the "GPL"), or27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),28 * in which case the provisions of the GPL or the LGPL are applicable instead29 * of those above. If you wish to allow use of your version of this file only30 * under the terms of either the GPL or the LGPL, and not to allow others to31 * use your version of this file under the terms of the MPL, indicate your32 * decision by deleting the provisions above and replace them with the notice33 * and other provisions required by the GPL or the LGPL. If you do not delete34 * the provisions above, a recipient may use your version of this file under35 * the terms of any one of the MPL, the GPL or the LGPL.36 *37 * ***** END LICENSE BLOCK ***** */38/*39 *40 * Date: 2002-07-0741 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.42 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.43 *44 * This test was created by running various patterns and strings through the45 * Perl 5 RegExp engine. We saved the results below to test the JS engine.46 *47 * Each of the examples below is a negative test; that is, each produces a48 * null match in Perl. Thus we set |expectedmatch| = |null| in each section.49 *50 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented51 * out such sections altogether, or modified them to fit what we expect from JS.52 *53 * EXAMPLES:54 *55 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.56 *57 * - ECMA doesn't support (?(condition)58 *59 */60//-----------------------------------------------------------------------------61var gTestfile = 'perlstress-002.js';62var i = 0;63var BUGNUMBER = 85721;64var summary = 'Testing regular expression edge cases';65var cnSingleSpace = ' ';66var status = '';67var statusmessages = new Array();68var pattern = '';69var patterns = new Array();70var string = '';71var strings = new Array();72var actualmatch = '';73var actualmatches = new Array();74var expectedmatch = '';75var expectedmatches = new Array();76var cnLBOUND = 0;77var cnUBOUND = 1000;78status = inSection(1);79pattern = /abc/;80string = 'xbc';81actualmatch = string.match(pattern);82expectedmatch = null;83addThis();84status = inSection(2);85pattern = /abc/;86string = 'axc';87actualmatch = string.match(pattern);88expectedmatch = null;89addThis();90status = inSection(3);91pattern = /abc/;92string = 'abx';93actualmatch = string.match(pattern);94expectedmatch = null;95addThis();96status = inSection(4);97pattern = /ab+bc/;98string = 'abc';99actualmatch = string.match(pattern);100expectedmatch = null;101addThis();102status = inSection(5);103pattern = /ab+bc/;104string = 'abq';105actualmatch = string.match(pattern);106expectedmatch = null;107addThis();108status = inSection(6);109pattern = /ab{1,}bc/;110string = 'abq';111actualmatch = string.match(pattern);112expectedmatch = null;113addThis();114status = inSection(7);115pattern = /ab{4,5}bc/;116string = 'abbbbc';117actualmatch = string.match(pattern);118expectedmatch = null;119addThis();120status = inSection(8);121pattern = /ab?bc/;122string = 'abbbbc';123actualmatch = string.match(pattern);124expectedmatch = null;125addThis();126status = inSection(9);127pattern = /^abc$/;128string = 'abcc';129actualmatch = string.match(pattern);130expectedmatch = null;131addThis();132status = inSection(10);133pattern = /^abc$/;134string = 'aabc';135actualmatch = string.match(pattern);136expectedmatch = null;137addThis();138status = inSection(11);139pattern = /abc$/;140string = 'aabcd';141actualmatch = string.match(pattern);142expectedmatch = null;143addThis();144status = inSection(12);145pattern = /a.*c/;146string = 'axyzd';147actualmatch = string.match(pattern);148expectedmatch = null;149addThis();150status = inSection(13);151pattern = /a[bc]d/;152string = 'abc';153actualmatch = string.match(pattern);154expectedmatch = null;155addThis();156status = inSection(14);157pattern = /a[b-d]e/;158string = 'abd';159actualmatch = string.match(pattern);160expectedmatch = null;161addThis();162status = inSection(15);163pattern = /a[^bc]d/;164string = 'abd';165actualmatch = string.match(pattern);166expectedmatch = null;167addThis();168status = inSection(16);169pattern = /a[^-b]c/;170string = 'a-c';171actualmatch = string.match(pattern);172expectedmatch = null;173addThis();174status = inSection(17);175pattern = /a[^]b]c/;176string = 'a]c';177actualmatch = string.match(pattern);178expectedmatch = null;179addThis();180status = inSection(18);181pattern = /\by\b/;182string = 'xy';183actualmatch = string.match(pattern);184expectedmatch = null;185addThis();186status = inSection(19);187pattern = /\by\b/;188string = 'yz';189actualmatch = string.match(pattern);190expectedmatch = null;191addThis();192status = inSection(20);193pattern = /\by\b/;194string = 'xyz';195actualmatch = string.match(pattern);196expectedmatch = null;197addThis();198status = inSection(21);199pattern = /\Ba\B/;200string = 'a-';201actualmatch = string.match(pattern);202expectedmatch = null;203addThis();204status = inSection(22);205pattern = /\Ba\B/;206string = '-a';207actualmatch = string.match(pattern);208expectedmatch = null;209addThis();210status = inSection(23);211pattern = /\Ba\B/;212string = '-a-';213actualmatch = string.match(pattern);214expectedmatch = null;215addThis();216status = inSection(24);217pattern = /\w/;218string = '-';219actualmatch = string.match(pattern);220expectedmatch = null;221addThis();222status = inSection(25);223pattern = /\W/;224string = 'a';225actualmatch = string.match(pattern);226expectedmatch = null;227addThis();228status = inSection(26);229pattern = /a\sb/;230string = 'a-b';231actualmatch = string.match(pattern);232expectedmatch = null;233addThis();234status = inSection(27);235pattern = /\d/;236string = '-';237actualmatch = string.match(pattern);238expectedmatch = null;239addThis();240status = inSection(28);241pattern = /\D/;242string = '1';243actualmatch = string.match(pattern);244expectedmatch = null;245addThis();246status = inSection(29);247pattern = /[\w]/;248string = '-';249actualmatch = string.match(pattern);250expectedmatch = null;251addThis();252status = inSection(30);253pattern = /[\W]/;254string = 'a';255actualmatch = string.match(pattern);256expectedmatch = null;257addThis();258status = inSection(31);259pattern = /a[\s]b/;260string = 'a-b';261actualmatch = string.match(pattern);262expectedmatch = null;263addThis();264status = inSection(32);265pattern = /[\d]/;266string = '-';267actualmatch = string.match(pattern);268expectedmatch = null;269addThis();270status = inSection(33);271pattern = /[\D]/;272string = '1';273actualmatch = string.match(pattern);274expectedmatch = null;275addThis();276status = inSection(34);277pattern = /$b/;278string = 'b';279actualmatch = string.match(pattern);280expectedmatch = null;281addThis();282status = inSection(35);283pattern = /^(ab|cd)e/;284string = 'abcde';285actualmatch = string.match(pattern);286expectedmatch = null;287addThis();288status = inSection(36);289pattern = /a[bcd]+dcdcde/;290string = 'adcdcde';291actualmatch = string.match(pattern);292expectedmatch = null;293addThis();294status = inSection(37);295pattern = /(bc+d$|ef*g.|h?i(j|k))/;296string = 'effg';297actualmatch = string.match(pattern);298expectedmatch = null;299addThis();300status = inSection(38);301pattern = /(bc+d$|ef*g.|h?i(j|k))/;302string = 'bcdd';303actualmatch = string.match(pattern);304expectedmatch = null;305addThis();306status = inSection(39);307pattern = /[k]/;308string = 'ab';309actualmatch = string.match(pattern);310expectedmatch = null;311addThis();312// MODIFIED - ECMA has different rules for paren contents.313status = inSection(40);314pattern = /(a)|\1/;315string = 'x';316actualmatch = string.match(pattern);317//expectedmatch = null;318expectedmatch = Array("", undefined);319addThis();320// MODIFIED - ECMA has different rules for paren contents.321status = inSection(41);322pattern = /((\3|b)\2(a)x)+/;323string = 'aaxabxbaxbbx';324actualmatch = string.match(pattern);325//expectedmatch = null;326expectedmatch = Array("ax", "ax", "", "a");327addThis();328status = inSection(42);329pattern = /abc/i;330string = 'XBC';331actualmatch = string.match(pattern);332expectedmatch = null;333addThis();334status = inSection(43);335pattern = /abc/i;336string = 'AXC';337actualmatch = string.match(pattern);338expectedmatch = null;339addThis();340status = inSection(44);341pattern = /abc/i;342string = 'ABX';343actualmatch = string.match(pattern);344expectedmatch = null;345addThis();346status = inSection(45);347pattern = /ab+bc/i;348string = 'ABC';349actualmatch = string.match(pattern);350expectedmatch = null;351addThis();352status = inSection(46);353pattern = /ab+bc/i;354string = 'ABQ';355actualmatch = string.match(pattern);356expectedmatch = null;357addThis();358status = inSection(47);359pattern = /ab{1,}bc/i;360string = 'ABQ';361actualmatch = string.match(pattern);362expectedmatch = null;363addThis();364status = inSection(48);365pattern = /ab{4,5}?bc/i;366string = 'ABBBBC';367actualmatch = string.match(pattern);368expectedmatch = null;369addThis();370status = inSection(49);371pattern = /ab??bc/i;372string = 'ABBBBC';373actualmatch = string.match(pattern);374expectedmatch = null;375addThis();376status = inSection(50);377pattern = /^abc$/i;378string = 'ABCC';379actualmatch = string.match(pattern);380expectedmatch = null;381addThis();382status = inSection(51);383pattern = /^abc$/i;384string = 'AABC';385actualmatch = string.match(pattern);386expectedmatch = null;387addThis();388status = inSection(52);389pattern = /a.*c/i;390string = 'AXYZD';391actualmatch = string.match(pattern);392expectedmatch = null;393addThis();394status = inSection(53);395pattern = /a[bc]d/i;396string = 'ABC';397actualmatch = string.match(pattern);398expectedmatch = null;399addThis();400status = inSection(54);401pattern = /a[b-d]e/i;402string = 'ABD';403actualmatch = string.match(pattern);404expectedmatch = null;405addThis();406status = inSection(55);407pattern = /a[^bc]d/i;408string = 'ABD';409actualmatch = string.match(pattern);410expectedmatch = null;411addThis();412status = inSection(56);413pattern = /a[^-b]c/i;414string = 'A-C';415actualmatch = string.match(pattern);416expectedmatch = null;417addThis();418status = inSection(57);419pattern = /a[^]b]c/i;420string = 'A]C';421actualmatch = string.match(pattern);422expectedmatch = null;423addThis();424status = inSection(58);425pattern = /$b/i;426string = 'B';427actualmatch = string.match(pattern);428expectedmatch = null;429addThis();430status = inSection(59);431pattern = /^(ab|cd)e/i;432string = 'ABCDE';433actualmatch = string.match(pattern);434expectedmatch = null;435addThis();436status = inSection(60);437pattern = /a[bcd]+dcdcde/i;438string = 'ADCDCDE';439actualmatch = string.match(pattern);440expectedmatch = null;441addThis();442status = inSection(61);443pattern = /(bc+d$|ef*g.|h?i(j|k))/i;444string = 'EFFG';445actualmatch = string.match(pattern);446expectedmatch = null;447addThis();448status = inSection(62);449pattern = /(bc+d$|ef*g.|h?i(j|k))/i;450string = 'BCDD';451actualmatch = string.match(pattern);452expectedmatch = null;453addThis();454status = inSection(63);455pattern = /[k]/i;456string = 'AB';457actualmatch = string.match(pattern);458expectedmatch = null;459addThis();460status = inSection(64);461pattern = /^(a\1?){4}$/;462string = 'aaaaaaaaa';463actualmatch = string.match(pattern);464expectedmatch = null;465addThis();466status = inSection(65);467pattern = /^(a\1?){4}$/;468string = 'aaaaaaaaaaa';469actualmatch = string.match(pattern);470expectedmatch = null;471addThis();472/* ECMA doesn't support (?(473 status = inSection(66);474 pattern = /^(a(?(1)\1)){4}$/;475 string = 'aaaaaaaaa';476 actualmatch = string.match(pattern);477 expectedmatch = null;478 addThis();479 status = inSection(67);480 pattern = /^(a(?(1)\1)){4}$/;481 string = 'aaaaaaaaaaa';482 actualmatch = string.match(pattern);483 expectedmatch = null;484 addThis();485*/486/* ECMA doesn't support (?<487 status = inSection(68);488 pattern = /(?<=a)b/;489 string = 'cb';490 actualmatch = string.match(pattern);491 expectedmatch = null;492 addThis();493 status = inSection(69);494 pattern = /(?<=a)b/;495 string = 'b';496 actualmatch = string.match(pattern);497 expectedmatch = null;498 addThis();499 status = inSection(70);500 pattern = /(?<!c)b/;501 string = 'cb';502 actualmatch = string.match(pattern);503 expectedmatch = null;504 addThis();505*/506/* ECMA doesn't support (?(condition)507 status = inSection(71);508 pattern = /(?:(?i)a)b/;509 string = 'aB';510 actualmatch = string.match(pattern);511 expectedmatch = null;512 addThis();513 status = inSection(72);514 pattern = /((?i)a)b/;515 string = 'aB';516 actualmatch = string.match(pattern);517 expectedmatch = null;518 addThis();519 status = inSection(73);520 pattern = /(?i:a)b/;521 string = 'aB';522 actualmatch = string.match(pattern);523 expectedmatch = null;524 addThis();525 status = inSection(74);526 pattern = /((?i:a))b/;527 string = 'aB';528 actualmatch = string.match(pattern);529 expectedmatch = null;530 addThis();531 status = inSection(75);532 pattern = /(?:(?-i)a)b/i;533 string = 'Ab';534 actualmatch = string.match(pattern);535 expectedmatch = null;536 addThis();537 status = inSection(76);538 pattern = /((?-i)a)b/i;539 string = 'Ab';540 actualmatch = string.match(pattern);541 expectedmatch = null;542 addThis();543 status = inSection(77);544 pattern = /(?:(?-i)a)b/i;545 string = 'AB';546 actualmatch = string.match(pattern);547 expectedmatch = null;548 addThis();549 status = inSection(78);550 pattern = /((?-i)a)b/i;551 string = 'AB';552 actualmatch = string.match(pattern);553 expectedmatch = null;554 addThis();555 status = inSection(79);556 pattern = /(?-i:a)b/i;557 string = 'Ab';558 actualmatch = string.match(pattern);559 expectedmatch = null;560 addThis();561 status = inSection(80);562 pattern = /((?-i:a))b/i;563 string = 'Ab';564 actualmatch = string.match(pattern);565 expectedmatch = null;566 addThis();567 status = inSection(81);568 pattern = /(?-i:a)b/i;569 string = 'AB';570 actualmatch = string.match(pattern);571 expectedmatch = null;572 addThis();573 status = inSection(82);574 pattern = /((?-i:a))b/i;575 string = 'AB';576 actualmatch = string.match(pattern);577 expectedmatch = null;578 addThis();579 status = inSection(83);580 pattern = /((?-i:a.))b/i;581 string = 'a\nB';582 actualmatch = string.match(pattern);583 expectedmatch = null;584 addThis();585 status = inSection(84);586 pattern = /((?s-i:a.))b/i;587 string = 'B\nB';588 actualmatch = string.match(pattern);589 expectedmatch = null;590 addThis();591*/592/* ECMA doesn't support (?<593 status = inSection(85);594 pattern = /(?<![cd])b/;595 string = 'dbcb';596 actualmatch = string.match(pattern);597 expectedmatch = null;598 addThis();599 status = inSection(86);600 pattern = /(?<!(c|d))b/;601 string = 'dbcb';602 actualmatch = string.match(pattern);603 expectedmatch = null;604 addThis();605*/606status = inSection(87);607pattern = /^(?:a?b?)*$/;608string = 'a--';609actualmatch = string.match(pattern);610expectedmatch = null;611addThis();612status = inSection(88);613pattern = /^b/;614string = 'a\nb\nc\n';615actualmatch = string.match(pattern);616expectedmatch = null;617addThis();618status = inSection(89);619pattern = /()^b/;620string = 'a\nb\nc\n';621actualmatch = string.match(pattern);622expectedmatch = null;623addThis();624/* ECMA doesn't support (?(625 status = inSection(90);626 pattern = /(?(1)a|b)/;627 string = 'a';628 actualmatch = string.match(pattern);629 expectedmatch = null;630 addThis();631 status = inSection(91);632 pattern = /(x)?(?(1)a|b)/;633 string = 'a';634 actualmatch = string.match(pattern);635 expectedmatch = null;636 addThis();637 status = inSection(92);638 pattern = /()(?(1)b|a)/;639 string = 'a';640 actualmatch = string.match(pattern);641 expectedmatch = null;642 addThis();643 status = inSection(93);644 pattern = /^(\()?blah(?(1)(\)))$/;645 string = 'blah)';646 actualmatch = string.match(pattern);647 expectedmatch = null;648 addThis();649 status = inSection(94);650 pattern = /^(\()?blah(?(1)(\)))$/;651 string = '(blah';652 actualmatch = string.match(pattern);653 expectedmatch = null;654 addThis();655 status = inSection(95);656 pattern = /^(\(+)?blah(?(1)(\)))$/;657 string = 'blah)';658 actualmatch = string.match(pattern);659 expectedmatch = null;660 addThis();661 status = inSection(96);662 pattern = /^(\(+)?blah(?(1)(\)))$/;663 string = '(blah';664 actualmatch = string.match(pattern);665 expectedmatch = null;666 addThis();667 status = inSection(97);668 pattern = /(?(?{0})a|b)/;669 string = 'a';670 actualmatch = string.match(pattern);671 expectedmatch = null;672 addThis();673 status = inSection(98);674 pattern = /(?(?{1})b|a)/;675 string = 'a';676 actualmatch = string.match(pattern);677 expectedmatch = null;678 addThis();679 status = inSection(99);680 pattern = /(?(?!a)a|b)/;681 string = 'a';682 actualmatch = string.match(pattern);683 expectedmatch = null;684 addThis();685 status = inSection(100);686 pattern = /(?(?=a)b|a)/;687 string = 'a';688 actualmatch = string.match(pattern);689 expectedmatch = null;690 addThis();691*/692status = inSection(101);693pattern = /^(?=(a+?))\1ab/;694string = 'aaab';695actualmatch = string.match(pattern);696expectedmatch = null;697addThis();698status = inSection(102);699pattern = /^(?=(a+?))\1ab/;700string = 'aaab';701actualmatch = string.match(pattern);702expectedmatch = null;703addThis();704status = inSection(103);705pattern = /([\w:]+::)?(\w+)$/;706string = 'abcd:';707actualmatch = string.match(pattern);708expectedmatch = null;709addThis();710status = inSection(104);711pattern = /([\w:]+::)?(\w+)$/;712string = 'abcd:';713actualmatch = string.match(pattern);714expectedmatch = null;715addThis();716status = inSection(105);717pattern = /(>a+)ab/;718string = 'aaab';719actualmatch = string.match(pattern);720expectedmatch = null;721addThis();722status = inSection(106);723pattern = /a\Z/;724string = 'a\nb\n';725actualmatch = string.match(pattern);726expectedmatch = null;727addThis();728status = inSection(107);729pattern = /a\z/;730string = 'a\nb\n';731actualmatch = string.match(pattern);732expectedmatch = null;733addThis();734status = inSection(108);735pattern = /a$/;736string = 'a\nb\n';737actualmatch = string.match(pattern);738expectedmatch = null;739addThis();740status = inSection(109);741pattern = /a\z/;742string = 'b\na\n';743actualmatch = string.match(pattern);744expectedmatch = null;745addThis();746status = inSection(110);747pattern = /a\z/m;748string = 'a\nb\n';749actualmatch = string.match(pattern);750expectedmatch = null;751addThis();752status = inSection(111);753pattern = /a\z/m;754string = 'b\na\n';755actualmatch = string.match(pattern);756expectedmatch = null;757addThis();758status = inSection(112);759pattern = /aa\Z/;760string = 'aa\nb\n';761actualmatch = string.match(pattern);762expectedmatch = null;763addThis();764status = inSection(113);765pattern = /aa\z/;766string = 'aa\nb\n';767actualmatch = string.match(pattern);768expectedmatch = null;769addThis();770status = inSection(114);771pattern = /aa$/;772string = 'aa\nb\n';773actualmatch = string.match(pattern);774expectedmatch = null;775addThis();776status = inSection(115);777pattern = /aa\z/;778string = 'b\naa\n';779actualmatch = string.match(pattern);780expectedmatch = null;781addThis();782status = inSection(116);783pattern = /aa\z/m;784string = 'aa\nb\n';785actualmatch = string.match(pattern);786expectedmatch = null;787addThis();788status = inSection(117);789pattern = /aa\z/m;790string = 'b\naa\n';791actualmatch = string.match(pattern);792expectedmatch = null;793addThis();794status = inSection(118);795pattern = /aa\Z/;796string = 'ac\nb\n';797actualmatch = string.match(pattern);798expectedmatch = null;799addThis();800status = inSection(119);801pattern = /aa\z/;802string = 'ac\nb\n';803actualmatch = string.match(pattern);804expectedmatch = null;805addThis();806status = inSection(120);807pattern = /aa$/;808string = 'ac\nb\n';809actualmatch = string.match(pattern);810expectedmatch = null;811addThis();812status = inSection(121);813pattern = /aa\Z/;814string = 'b\nac\n';815actualmatch = string.match(pattern);816expectedmatch = null;817addThis();818status = inSection(122);819pattern = /aa\z/;820string = 'b\nac\n';821actualmatch = string.match(pattern);822expectedmatch = null;823addThis();824status = inSection(123);825pattern = /aa$/;826string = 'b\nac\n';827actualmatch = string.match(pattern);828expectedmatch = null;829addThis();830status = inSection(124);831pattern = /aa\Z/;832string = 'b\nac';833actualmatch = string.match(pattern);834expectedmatch = null;835addThis();836status = inSection(125);837pattern = /aa\z/;838string = 'b\nac';839actualmatch = string.match(pattern);840expectedmatch = null;841addThis();842status = inSection(126);843pattern = /aa$/;844string = 'b\nac';845actualmatch = string.match(pattern);846expectedmatch = null;847addThis();848status = inSection(127);849pattern = /aa\Z/m;850string = 'ac\nb\n';851actualmatch = string.match(pattern);852expectedmatch = null;853addThis();854status = inSection(128);855pattern = /aa\z/m;856string = 'ac\nb\n';857actualmatch = string.match(pattern);858expectedmatch = null;859addThis();860status = inSection(129);861pattern = /aa$/m;862string = 'ac\nb\n';863actualmatch = string.match(pattern);864expectedmatch = null;865addThis();866status = inSection(130);867pattern = /aa\Z/m;868string = 'b\nac\n';869actualmatch = string.match(pattern);870expectedmatch = null;871addThis();872status = inSection(131);873pattern = /aa\z/m;874string = 'b\nac\n';875actualmatch = string.match(pattern);876expectedmatch = null;877addThis();878status = inSection(132);879pattern = /aa$/m;880string = 'b\nac\n';881actualmatch = string.match(pattern);882expectedmatch = null;883addThis();884status = inSection(133);885pattern = /aa\Z/m;886string = 'b\nac';887actualmatch = string.match(pattern);888expectedmatch = null;889addThis();890status = inSection(134);891pattern = /aa\z/m;892string = 'b\nac';893actualmatch = string.match(pattern);894expectedmatch = null;895addThis();896status = inSection(135);897pattern = /aa$/m;898string = 'b\nac';899actualmatch = string.match(pattern);900expectedmatch = null;901addThis();902status = inSection(136);903pattern = /aa\Z/;904string = 'ca\nb\n';905actualmatch = string.match(pattern);906expectedmatch = null;907addThis();908status = inSection(137);909pattern = /aa\z/;910string = 'ca\nb\n';911actualmatch = string.match(pattern);912expectedmatch = null;913addThis();914status = inSection(138);915pattern = /aa$/;916string = 'ca\nb\n';917actualmatch = string.match(pattern);918expectedmatch = null;919addThis();920status = inSection(139);921pattern = /aa\Z/;922string = 'b\nca\n';923actualmatch = string.match(pattern);924expectedmatch = null;925addThis();926status = inSection(140);927pattern = /aa\z/;928string = 'b\nca\n';929actualmatch = string.match(pattern);930expectedmatch = null;931addThis();932status = inSection(141);933pattern = /aa$/;934string = 'b\nca\n';935actualmatch = string.match(pattern);936expectedmatch = null;937addThis();938status = inSection(142);939pattern = /aa\Z/;940string = 'b\nca';941actualmatch = string.match(pattern);942expectedmatch = null;943addThis();944status = inSection(143);945pattern = /aa\z/;946string = 'b\nca';947actualmatch = string.match(pattern);948expectedmatch = null;949addThis();950status = inSection(144);951pattern = /aa$/;952string = 'b\nca';953actualmatch = string.match(pattern);954expectedmatch = null;955addThis();956status = inSection(145);957pattern = /aa\Z/m;958string = 'ca\nb\n';959actualmatch = string.match(pattern);960expectedmatch = null;961addThis();962status = inSection(146);963pattern = /aa\z/m;964string = 'ca\nb\n';965actualmatch = string.match(pattern);966expectedmatch = null;967addThis();968status = inSection(147);969pattern = /aa$/m;970string = 'ca\nb\n';971actualmatch = string.match(pattern);972expectedmatch = null;973addThis();974status = inSection(148);975pattern = /aa\Z/m;976string = 'b\nca\n';977actualmatch = string.match(pattern);978expectedmatch = null;979addThis();980status = inSection(149);981pattern = /aa\z/m;982string = 'b\nca\n';983actualmatch = string.match(pattern);984expectedmatch = null;985addThis();986status = inSection(150);987pattern = /aa$/m;988string = 'b\nca\n';989actualmatch = string.match(pattern);990expectedmatch = null;991addThis();992status = inSection(151);993pattern = /aa\Z/m;994string = 'b\nca';995actualmatch = string.match(pattern);996expectedmatch = null;997addThis();998status = inSection(152);999pattern = /aa\z/m;1000string = 'b\nca';1001actualmatch = string.match(pattern);1002expectedmatch = null;1003addThis();1004status = inSection(153);1005pattern = /aa$/m;1006string = 'b\nca';1007actualmatch = string.match(pattern);1008expectedmatch = null;1009addThis();1010status = inSection(154);1011pattern = /ab\Z/;1012string = 'ab\nb\n';1013actualmatch = string.match(pattern);1014expectedmatch = null;1015addThis();1016status = inSection(155);1017pattern = /ab\z/;1018string = 'ab\nb\n';1019actualmatch = string.match(pattern);1020expectedmatch = null;1021addThis();1022status = inSection(156);1023pattern = /ab$/;1024string = 'ab\nb\n';1025actualmatch = string.match(pattern);1026expectedmatch = null;1027addThis();1028status = inSection(157);1029pattern = /ab\z/;1030string = 'b\nab\n';1031actualmatch = string.match(pattern);1032expectedmatch = null;1033addThis();1034status = inSection(158);1035pattern = /ab\z/m;1036string = 'ab\nb\n';1037actualmatch = string.match(pattern);1038expectedmatch = null;1039addThis();1040status = inSection(159);1041pattern = /ab\z/m;1042string = 'b\nab\n';1043actualmatch = string.match(pattern);1044expectedmatch = null;1045addThis();1046status = inSection(160);1047pattern = /ab\Z/;1048string = 'ac\nb\n';1049actualmatch = string.match(pattern);1050expectedmatch = null;1051addThis();1052status = inSection(161);1053pattern = /ab\z/;1054string = 'ac\nb\n';1055actualmatch = string.match(pattern);1056expectedmatch = null;1057addThis();1058status = inSection(162);1059pattern = /ab$/;1060string = 'ac\nb\n';1061actualmatch = string.match(pattern);1062expectedmatch = null;1063addThis();1064status = inSection(163);1065pattern = /ab\Z/;1066string = 'b\nac\n';1067actualmatch = string.match(pattern);1068expectedmatch = null;1069addThis();1070status = inSection(164);1071pattern = /ab\z/;1072string = 'b\nac\n';1073actualmatch = string.match(pattern);1074expectedmatch = null;1075addThis();1076status = inSection(165);1077pattern = /ab$/;1078string = 'b\nac\n';1079actualmatch = string.match(pattern);1080expectedmatch = null;1081addThis();1082status = inSection(166);1083pattern = /ab\Z/;1084string = 'b\nac';1085actualmatch = string.match(pattern);1086expectedmatch = null;1087addThis();1088status = inSection(167);1089pattern = /ab\z/;1090string = 'b\nac';1091actualmatch = string.match(pattern);1092expectedmatch = null;1093addThis();1094status = inSection(168);1095pattern = /ab$/;1096string = 'b\nac';1097actualmatch = string.match(pattern);1098expectedmatch = null;1099addThis();1100status = inSection(169);1101pattern = /ab\Z/m;1102string = 'ac\nb\n';1103actualmatch = string.match(pattern);1104expectedmatch = null;1105addThis();1106status = inSection(170);1107pattern = /ab\z/m;1108string = 'ac\nb\n';1109actualmatch = string.match(pattern);1110expectedmatch = null;1111addThis();1112status = inSection(171);1113pattern = /ab$/m;1114string = 'ac\nb\n';1115actualmatch = string.match(pattern);1116expectedmatch = null;1117addThis();1118status = inSection(172);1119pattern = /ab\Z/m;1120string = 'b\nac\n';1121actualmatch = string.match(pattern);1122expectedmatch = null;1123addThis();1124status = inSection(173);1125pattern = /ab\z/m;1126string = 'b\nac\n';1127actualmatch = string.match(pattern);1128expectedmatch = null;1129addThis();1130status = inSection(174);1131pattern = /ab$/m;1132string = 'b\nac\n';1133actualmatch = string.match(pattern);1134expectedmatch = null;1135addThis();1136status = inSection(175);1137pattern = /ab\Z/m;1138string = 'b\nac';1139actualmatch = string.match(pattern);1140expectedmatch = null;1141addThis();1142status = inSection(176);1143pattern = /ab\z/m;1144string = 'b\nac';1145actualmatch = string.match(pattern);1146expectedmatch = null;1147addThis();1148status = inSection(177);1149pattern = /ab$/m;1150string = 'b\nac';1151actualmatch = string.match(pattern);1152expectedmatch = null;1153addThis();1154status = inSection(178);1155pattern = /ab\Z/;1156string = 'ca\nb\n';1157actualmatch = string.match(pattern);1158expectedmatch = null;1159addThis();1160status = inSection(179);1161pattern = /ab\z/;1162string = 'ca\nb\n';1163actualmatch = string.match(pattern);1164expectedmatch = null;1165addThis();1166status = inSection(180);1167pattern = /ab$/;1168string = 'ca\nb\n';1169actualmatch = string.match(pattern);1170expectedmatch = null;1171addThis();1172status = inSection(181);1173pattern = /ab\Z/;1174string = 'b\nca\n';1175actualmatch = string.match(pattern);1176expectedmatch = null;1177addThis();1178status = inSection(182);1179pattern = /ab\z/;1180string = 'b\nca\n';1181actualmatch = string.match(pattern);1182expectedmatch = null;1183addThis();1184status = inSection(183);1185pattern = /ab$/;1186string = 'b\nca\n';1187actualmatch = string.match(pattern);1188expectedmatch = null;1189addThis();1190status = inSection(184);1191pattern = /ab\Z/;1192string = 'b\nca';1193actualmatch = string.match(pattern);1194expectedmatch = null;1195addThis();1196status = inSection(185);1197pattern = /ab\z/;1198string = 'b\nca';1199actualmatch = string.match(pattern);1200expectedmatch = null;1201addThis();1202status = inSection(186);1203pattern = /ab$/;1204string = 'b\nca';1205actualmatch = string.match(pattern);1206expectedmatch = null;1207addThis();1208status = inSection(187);1209pattern = /ab\Z/m;1210string = 'ca\nb\n';1211actualmatch = string.match(pattern);1212expectedmatch = null;1213addThis();1214status = inSection(188);1215pattern = /ab\z/m;1216string = 'ca\nb\n';1217actualmatch = string.match(pattern);1218expectedmatch = null;1219addThis();1220status = inSection(189);1221pattern = /ab$/m;1222string = 'ca\nb\n';1223actualmatch = string.match(pattern);1224expectedmatch = null;1225addThis();1226status = inSection(190);1227pattern = /ab\Z/m;1228string = 'b\nca\n';1229actualmatch = string.match(pattern);1230expectedmatch = null;1231addThis();1232status = inSection(191);1233pattern = /ab\z/m;1234string = 'b\nca\n';1235actualmatch = string.match(pattern);1236expectedmatch = null;1237addThis();1238status = inSection(192);1239pattern = /ab$/m;1240string = 'b\nca\n';1241actualmatch = string.match(pattern);1242expectedmatch = null;1243addThis();1244status = inSection(193);1245pattern = /ab\Z/m;1246string = 'b\nca';1247actualmatch = string.match(pattern);1248expectedmatch = null;1249addThis();1250status = inSection(194);1251pattern = /ab\z/m;1252string = 'b\nca';1253actualmatch = string.match(pattern);1254expectedmatch = null;1255addThis();1256status = inSection(195);1257pattern = /ab$/m;1258string = 'b\nca';1259actualmatch = string.match(pattern);1260expectedmatch = null;1261addThis();1262status = inSection(196);1263pattern = /abb\Z/;1264string = 'abb\nb\n';1265actualmatch = string.match(pattern);1266expectedmatch = null;1267addThis();1268status = inSection(197);1269pattern = /abb\z/;1270string = 'abb\nb\n';1271actualmatch = string.match(pattern);1272expectedmatch = null;1273addThis();1274status = inSection(198);1275pattern = /abb$/;1276string = 'abb\nb\n';1277actualmatch = string.match(pattern);1278expectedmatch = null;1279addThis();1280status = inSection(199);1281pattern = /abb\z/;1282string = 'b\nabb\n';1283actualmatch = string.match(pattern);1284expectedmatch = null;1285addThis();1286status = inSection(200);1287pattern = /abb\z/m;1288string = 'abb\nb\n';1289actualmatch = string.match(pattern);1290expectedmatch = null;1291addThis();1292status = inSection(201);1293pattern = /abb\z/m;1294string = 'b\nabb\n';1295actualmatch = string.match(pattern);1296expectedmatch = null;1297addThis();1298status = inSection(202);1299pattern = /abb\Z/;1300string = 'ac\nb\n';1301actualmatch = string.match(pattern);1302expectedmatch = null;1303addThis();1304status = inSection(203);1305pattern = /abb\z/;1306string = 'ac\nb\n';1307actualmatch = string.match(pattern);1308expectedmatch = null;1309addThis();1310status = inSection(204);1311pattern = /abb$/;1312string = 'ac\nb\n';1313actualmatch = string.match(pattern);1314expectedmatch = null;1315addThis();1316status = inSection(205);1317pattern = /abb\Z/;1318string = 'b\nac\n';1319actualmatch = string.match(pattern);1320expectedmatch = null;1321addThis();1322status = inSection(206);1323pattern = /abb\z/;1324string = 'b\nac\n';1325actualmatch = string.match(pattern);1326expectedmatch = null;1327addThis();1328status = inSection(207);1329pattern = /abb$/;1330string = 'b\nac\n';1331actualmatch = string.match(pattern);1332expectedmatch = null;1333addThis();1334status = inSection(208);1335pattern = /abb\Z/;1336string = 'b\nac';1337actualmatch = string.match(pattern);1338expectedmatch = null;1339addThis();1340status = inSection(209);1341pattern = /abb\z/;1342string = 'b\nac';1343actualmatch = string.match(pattern);1344expectedmatch = null;1345addThis();1346status = inSection(210);1347pattern = /abb$/;1348string = 'b\nac';1349actualmatch = string.match(pattern);1350expectedmatch = null;1351addThis();1352status = inSection(211);1353pattern = /abb\Z/m;1354string = 'ac\nb\n';1355actualmatch = string.match(pattern);1356expectedmatch = null;1357addThis();1358status = inSection(212);1359pattern = /abb\z/m;1360string = 'ac\nb\n';1361actualmatch = string.match(pattern);1362expectedmatch = null;1363addThis();1364status = inSection(213);1365pattern = /abb$/m;1366string = 'ac\nb\n';1367actualmatch = string.match(pattern);1368expectedmatch = null;1369addThis();1370status = inSection(214);1371pattern = /abb\Z/m;1372string = 'b\nac\n';1373actualmatch = string.match(pattern);1374expectedmatch = null;1375addThis();1376status = inSection(215);1377pattern = /abb\z/m;1378string = 'b\nac\n';1379actualmatch = string.match(pattern);1380expectedmatch = null;1381addThis();1382status = inSection(216);1383pattern = /abb$/m;1384string = 'b\nac\n';1385actualmatch = string.match(pattern);1386expectedmatch = null;1387addThis();1388status = inSection(217);1389pattern = /abb\Z/m;1390string = 'b\nac';1391actualmatch = string.match(pattern);1392expectedmatch = null;1393addThis();1394status = inSection(218);1395pattern = /abb\z/m;1396string = 'b\nac';1397actualmatch = string.match(pattern);1398expectedmatch = null;1399addThis();1400status = inSection(219);1401pattern = /abb$/m;1402string = 'b\nac';1403actualmatch = string.match(pattern);1404expectedmatch = null;1405addThis();1406status = inSection(220);1407pattern = /abb\Z/;1408string = 'ca\nb\n';1409actualmatch = string.match(pattern);1410expectedmatch = null;1411addThis();1412status = inSection(221);1413pattern = /abb\z/;1414string = 'ca\nb\n';1415actualmatch = string.match(pattern);1416expectedmatch = null;1417addThis();1418status = inSection(222);1419pattern = /abb$/;1420string = 'ca\nb\n';1421actualmatch = string.match(pattern);1422expectedmatch = null;1423addThis();1424status = inSection(223);1425pattern = /abb\Z/;1426string = 'b\nca\n';1427actualmatch = string.match(pattern);1428expectedmatch = null;1429addThis();1430status = inSection(224);1431pattern = /abb\z/;1432string = 'b\nca\n';1433actualmatch = string.match(pattern);1434expectedmatch = null;1435addThis();1436status = inSection(225);1437pattern = /abb$/;1438string = 'b\nca\n';1439actualmatch = string.match(pattern);1440expectedmatch = null;1441addThis();1442status = inSection(226);1443pattern = /abb\Z/;1444string = 'b\nca';1445actualmatch = string.match(pattern);1446expectedmatch = null;1447addThis();1448status = inSection(227);1449pattern = /abb\z/;1450string = 'b\nca';1451actualmatch = string.match(pattern);1452expectedmatch = null;1453addThis();1454status = inSection(228);1455pattern = /abb$/;1456string = 'b\nca';1457actualmatch = string.match(pattern);1458expectedmatch = null;1459addThis();1460status = inSection(229);1461pattern = /abb\Z/m;1462string = 'ca\nb\n';1463actualmatch = string.match(pattern);1464expectedmatch = null;1465addThis();1466status = inSection(230);1467pattern = /abb\z/m;1468string = 'ca\nb\n';1469actualmatch = string.match(pattern);1470expectedmatch = null;1471addThis();1472status = inSection(231);1473pattern = /abb$/m;1474string = 'ca\nb\n';1475actualmatch = string.match(pattern);1476expectedmatch = null;1477addThis();1478status = inSection(232);1479pattern = /abb\Z/m;1480string = 'b\nca\n';1481actualmatch = string.match(pattern);1482expectedmatch = null;1483addThis();1484status = inSection(233);1485pattern = /abb\z/m;1486string = 'b\nca\n';1487actualmatch = string.match(pattern);1488expectedmatch = null;1489addThis();1490status = inSection(234);1491pattern = /abb$/m;1492string = 'b\nca\n';1493actualmatch = string.match(pattern);1494expectedmatch = null;1495addThis();1496status = inSection(235);1497pattern = /abb\Z/m;1498string = 'b\nca';1499actualmatch = string.match(pattern);1500expectedmatch = null;1501addThis();1502status = inSection(236);1503pattern = /abb\z/m;1504string = 'b\nca';1505actualmatch = string.match(pattern);1506expectedmatch = null;1507addThis();1508status = inSection(237);1509pattern = /abb$/m;1510string = 'b\nca';1511actualmatch = string.match(pattern);1512expectedmatch = null;1513addThis();1514status = inSection(238);1515pattern = /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;1516string = 'x';1517actualmatch = string.match(pattern);1518expectedmatch = null;1519addThis();1520status = inSection(239);1521pattern = /\GX.*X/;1522string = 'aaaXbX';1523actualmatch = string.match(pattern);1524expectedmatch = null;1525addThis();1526status = inSection(240);1527pattern = /\.c(pp|xx|c)?$/i;1528string = 'Changes';1529actualmatch = string.match(pattern);1530expectedmatch = null;1531addThis();1532status = inSection(241);1533pattern = /^([a-z]:)/;1534string = 'C:/';1535actualmatch = string.match(pattern);1536expectedmatch = null;1537addThis();1538status = inSection(242);1539pattern = /(\w)?(abc)\1b/;1540string = 'abcab';1541actualmatch = string.match(pattern);1542expectedmatch = null;1543addThis();1544/* ECMA doesn't support (?(1545 status = inSection(243);1546 pattern = /^(a)?(?(1)a|b)+$/;1547 string = 'a';1548 actualmatch = string.match(pattern);1549 expectedmatch = null;1550 addThis();1551*/1552//-----------------------------------------------------------------------------1553test();1554//-----------------------------------------------------------------------------1555function addThis()1556{1557 if(omitCurrentSection())1558 return;1559 statusmessages[i] = status;1560 patterns[i] = pattern;1561 strings[i] = string;1562 actualmatches[i] = actualmatch;1563 expectedmatches[i] = expectedmatch;1564 i++;1565}1566function omitCurrentSection()1567{1568 try1569 {1570 // current section number is in global status variable1571 var n = status.match(/(\d+)/)[1];1572 return ((n < cnLBOUND) || (n > cnUBOUND));1573 }1574 catch(e)1575 {1576 return false;1577 }1578}1579function test()1580{1581 enterFunc ('test');1582 printBugNumber(BUGNUMBER);1583 printStatus (summary);1584 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);1585 exitFunc ('test');...
AddAccount.test.js
Source:AddAccount.test.js
1/*2 * Copyright (c) 2021 Huawei Device Co., Ltd.3 * Licensed under the Apache License, Version 2.0 (the "License");4 * you may not use this file except in compliance with the License.5 * You may obtain a copy of the License at6 *7 * http://www.apache.org/licenses/LICENSE-2.08 *9 * Unless required by applicable law or agreed to in writing, software10 * distributed under the License is distributed on an "AS IS" BASIS,11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12 * See the License for the specific language governing permissions and13 * limitations under the License.14 */15import account from '@ohos.account.appAccount'16import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'17const NAMELIMIT = 512;18const LENGTHLIMIT = 1024;19describe('ActsAccountAddAccount', function () {20 /*21 * @tc.number : ActsAccountAddAccount_010022 * @tc.name : Add account calllback form23 * @tc.desc : Add account in calllback form without additional information24 */25 it('ActsAccountAddAccount_0100', 0, async function (done) {26 console.debug("====>ActsAccountAddAccount_0100 start====");27 var appAccountManager = account.createAppAccountManager();28 console.debug("====>creat finish====");29 appAccountManager.addAccount("account_name_callback_first", (err)=>{30 console.debug("====>add account ActsAccountAddAccount_0100 err:" + JSON.stringify(err));31 expect(err.code).assertEqual(0);32 appAccountManager.deleteAccount("account_name_callback_first", (err)=>{33 console.debug("====>delete Account ActsAccountAddAccount_0100 err:" + JSON.stringify(err));34 expect(err.code).assertEqual(0);35 console.debug("====>ActsAccountAddAccount_0100 end====");36 done();37 });38 });39 });40 /*41 * @tc.number : ActsAccountAddAccount_020042 * @tc.name : Add account promise form43 * @tc.desc : Add account in promise form without additional information44 */45 it('ActsAccountAddAccount_0200', 0, async function (done) {46 console.debug("====>ActsAccountAddAccount_0200 start====");47 var appAccountManager = account.createAppAccountManager();48 console.debug("====>creat finish====");49 console.debug("====>add account start====");50 try{51 await appAccountManager.addAccount("account_name_promise_first");52 }53 catch(err){54 console.error("====>add account fail err:" + JSON.stringify(err));55 expect().assertFail();56 done();57 }58 console.debug("====>delete account start====");59 await appAccountManager.deleteAccount("account_name_promise_first");60 console.debug("====>ActsAccountAddAccount_0200 end====");61 done(); 62 });63 /*64 * @tc.number : ActsAccountAddAccount_030065 * @tc.name : Add account calllback form66 * @tc.desc : Add account in calllback form with additional information67 */68 it('ActsAccountAddAccount_0300', 0, async function (done) {69 console.debug("====>ActsAccountAddAccount_0300 start====");70 var appAccountManager = account.createAppAccountManager();71 console.debug("====>creat finish====");72 appAccountManager.addAccount("account_name_callback_second", "account_extraInfo_callback_second", (err)=>{73 console.debug("====>add account ActsAccountAddAccount_0300 err:" + JSON.stringify(err));74 expect(err.code).assertEqual(0);75 appAccountManager.deleteAccount("account_name_callback_second", (err)=>{76 console.debug("====>delete Account ActsAccountAddAccount_0300 err:" + JSON.stringify(err));77 expect(err.code).assertEqual(0);78 console.debug("====>ActsAccountAddAccount_0300 end====");79 done();80 });81 });82 });83 /*84 * @tc.number : ActsAccountAddAccount_040085 * @tc.name : Add account promise form86 * @tc.desc : Add account in promise form with additional information87 */88 it('ActsAccountAddAccount_0400', 0, async function (done) {89 console.debug("====>ActsAccountAddAccount_0400 start====");90 var appAccountManager = account.createAppAccountManager();91 console.debug("====>creat finish====");92 console.debug("====>add account start====");93 try{94 await appAccountManager.addAccount("account_name_promise_second", "account_extraInfo_promise_second");95 }96 catch(err){97 console.error("====>add account fail err:" + JSON.stringify(err));98 expect().assertFail();99 done();100 }101 console.debug("====>delete account start====");102 await appAccountManager.deleteAccount("account_name_promise_second");103 console.debug("====>ActsAccountAddAccount_0400 end====");104 done();105 });106 /*107 * @tc.number : ActsAccountAddAccount_0500108 * @tc.name : Add account calllback form109 * @tc.desc : Repeatedly add the same name account and the same additional information110 */111 it('ActsAccountAddAccount_0500', 0, async function (done) {112 console.debug("====>ActsAccountAddAccount_0500 start====");113 var appAccountManager = account.createAppAccountManager();114 appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{115 console.debug("====>add account first time ActsAccountAddAccount_0500 err:" + JSON.stringify(err));116 expect(err.code).assertEqual(0);117 appAccountManager.addAccount("account_name_callback_third", "account_extraInfo_callback_third", (err)=>{118 console.debug("====>add account second time ActsAccountAddAccount_0500 err:" + JSON.stringify(err));119 expect(err.code != 0).assertEqual(true);120 appAccountManager.deleteAccount("account_name_callback_third", (err)=>{121 console.debug("====>delete Account ActsAccountAddAccount_0500 err:" + JSON.stringify(err));122 expect(err.code).assertEqual(0);123 console.debug("====>ActsAccountAddAccount_0500 end====");124 done();125 });126 });127 });128 });129 /*130 * @tc.number : ActsAccountAddAccount_0600131 * @tc.name : Add account promise form132 * @tc.desc : Repeatedly add the same name account and the same additional information133 */134 it('ActsAccountAddAccount_0600', 0, async function (done) {135 console.debug("====>ActsAccountAddAccount_0600 start====");136 var appAccountManager = account.createAppAccountManager();137 console.debug("====>add account for the first time ActsAccountAddAccount_0600====");138 await appAccountManager.addAccount("account_name_promise_third", "account_extraInfo_promise_third");139 console.debug("====>add account for the second time ActsAccountAddAccount_0600 start====");140 try{141 await appAccountManager.addAccount("account_name_promise_third", "account_extraInfo_promise_third");142 }143 catch(err){144 console.debug("====>add account for the second time 0600 err:" + JSON.stringify(err));145 expect(err.code != 0).assertEqual(true);146 await appAccountManager.deleteAccount("account_name_promise_third");147 console.debug("====>ActsAccountAddAccount_0600 end====");148 done();149 }150 });151 /*152 * @tc.number : ActsAccountAddAccount_0700153 * @tc.name : Add account calllback form154 * @tc.desc : The account name exceeds the length limit of 512 characters155 */156 it('ActsAccountAddAccount_0700', 0, async function (done) {157 console.debug("====>ActsAccountAddAccount_0700 start====");158 var limitAccountName = '';159 for (var i = 0; i < NAMELIMIT + 1; i++) {160 limitAccountName += 't';161 }162 var appAccountManager = account.createAppAccountManager();163 appAccountManager.addAccount(limitAccountName, "account_extraInfo_callback_fourth", (err)=>{164 console.debug("====>add account ActsAccountAddAccount_0700 err:" + JSON.stringify(err));165 expect(err.code != 0).assertEqual(true);166 console.debug("====>ActsAccountAddAccount_0700 end====");167 done();168 });169 });170 /*171 * @tc.number : ActsAccountAddAccount_0800172 * @tc.name : Add account promise form173 * @tc.desc : The account name exceeds the length limit of 512 characters174 */175 it('ActsAccountAddAccount_0800', 0, async function (done) {176 console.debug("====>ActsAccountAddAccount_0800 start====");177 var limitAccountName = '';178 for (var i = 0; i < NAMELIMIT + 1; i++) {179 limitAccountName += 'n';180 }181 var appAccountManager = account.createAppAccountManager();182 try{183 await appAccountManager.addAccount(limitAccountName, "account_extraInfo_promise_fourth");184 }185 catch(err){186 console.debug("====>add account ActsAccountAddAccount_0800 err:" + JSON.stringify(err));187 expect(err.code != 0).assertEqual(true);188 console.debug("====>ActsAccountAddAccount_0800 end====");189 done();190 }191 });192 /*193 * @tc.number : ActsAccountAddAccount_0900194 * @tc.name : Add account calllback form195 * @tc.desc : Additional information exceeds the length limit of 1024 characters196 */197 it('ActsAccountAddAccount_0900', 0, async function (done) {198 console.debug("====>ActsAccountAddAccount_0900 start====");199 var limitAccountExtra = '';200 for (var i = 0; i < LENGTHLIMIT + 1; i++) {201 limitAccountExtra += 't';202 }203 var appAccountManager = account.createAppAccountManager();204 appAccountManager.addAccount("account_name_callback_fifth", limitAccountExtra, (err)=>{205 console.debug("====>add account ActsAccountAddAccount_0900 err:" + JSON.stringify(err));206 expect(err.code != 0).assertEqual(true);207 console.debug("====>ActsAccountAddAccount_0900 end====");208 done();209 });210 });211 /*212 * @tc.number : ActsAccountAddAccount_1000213 * @tc.name : Add account promise form214 * @tc.desc : Additional information exceeds the length limit of 1024 characters215 */216 it('ActsAccountAddAccount_1000', 0, async function (done) {217 console.debug("====>ActsAccountAddAccount_1000 start====");218 var limitAccountExtra = '';219 for (var i = 0; i < LENGTHLIMIT + 1; i++) {220 limitAccountExtra += 'e';221 }222 var appAccountManager = account.createAppAccountManager();223 try{224 await appAccountManager.addAccount("account_name_promise_fifth", limitAccountExtra);225 }226 catch(err){227 console.debug("====>add account ActsAccountAddAccount_1000 err:" + JSON.stringify(err));228 expect(err.code != 0).assertEqual(true);229 console.debug("====>ActsAccountAddAccount_1000 end====");230 done();231 }232 });233 /*234 * @tc.number : ActsAccountAddAccount_1100235 * @tc.name : Add account calllback form236 * @tc.desc : The account name is an empty string237 */238 it('ActsAccountAddAccount_1100', 0, async function (done) {239 console.debug("====>ActsAccountAddAccount_1100 start====");240 var appAccountManager = account.createAppAccountManager();241 appAccountManager.addAccount("", "account_name_callback_sixth", (err)=>{242 console.debug("====>add account ActsAccountAddAccount_1100 err:" + JSON.stringify(err));243 expect(err.code != 0).assertEqual(true);244 console.debug("====>ActsAccountAddAccount_1100 end====");245 done();246 });247 });248 /*249 * @tc.number : ActsAccountAddAccount_1200250 * @tc.name : Add account promise form251 * @tc.desc : The account name is an empty string252 */253 it('ActsAccountAddAccount_1200', 0, async function (done) {254 console.debug("====>ActsAccountAddAccount_1200 start====");255 console.debug("====>ActsAccountAddAccount_1200 add account start====");256 var appAccountManager = account.createAppAccountManager();257 try{258 await appAccountManager.addAccount("", "account_name_promise_sixth");259 }260 catch(err){261 console.debug("====>add account ActsAccountAddAccount_1200 err:"+ JSON.stringify(err));262 expect(err.code != 0).assertEqual(true);263 console.debug("====>ActsAccountAddAccount_1200 end====");264 done();265 }266 });267 /*268 * @tc.number : ActsAccountAddAccount_1300269 * @tc.name : Add account calllback form270 * @tc.desc : Additional information is an empty string271 */272 it('ActsAccountAddAccount_1300', 0, async function (done) {273 console.debug("====>ActsAccountAddAccount_1300 start====");274 var appAccountManager = account.createAppAccountManager();275 appAccountManager.addAccount("account_name_callback_seventh", "", (err)=>{276 console.debug("====>add account ActsAccountAddAccount_1300 err:" + JSON.stringify(err));277 expect(err.code).assertEqual(0);278 appAccountManager.deleteAccount("account_name_callback_seventh", (err)=>{279 console.debug("====>delete Account ActsAccountAddAccount_1300 err:" + JSON.stringify(err));280 expect(err.code).assertEqual(0);281 console.debug("====>ActsAccountAddAccount_1300 end====");282 done();283 });284 });285 });286 /*287 * @tc.number : ActsAccountAddAccount_1400288 * @tc.name : Add account promise form289 * @tc.desc : Additional information is an empty string290 */291 it('ActsAccountAddAccount_1400', 0, async function (done) {292 console.debug("====>ActsAccountAddAccount_1400 start====");293 var appAccountManager = account.createAppAccountManager();294 console.debug("====>add account ActsAccountAddAccount_1400 start====");295 try{296 await appAccountManager.addAccount("account_name_promise_seventh", "");297 }298 catch(err){299 console.error("====>add account ActsAccountAddAccount_1400 err:" + JSON.stringify(err));300 expect().assertFail();301 done();302 }303 console.debug("====>delete account ActsAccountAddAccount_1400 start====");304 await appAccountManager.deleteAccount("account_name_promise_seventh");305 done();306 });307 /*308 * @tc.number : ActsAccountAddAccount_1500309 * @tc.name : Add account calllback form310 * @tc.desc : The account name is a special character such as a space311 */312 it('ActsAccountAddAccount_1500', 0, async function (done) {313 console.debug("====>ActsAccountAddAccount_1500 start====");314 var appAccountManager = account.createAppAccountManager();315 var specialStr = " ";316 appAccountManager.addAccount(specialStr, "account_extraInfo_callback_eight", (err)=>{317 console.debug("====>add account ActsAccountAddAccount_1500 err:" + JSON.stringify(err));318 expect(err.code != 0).assertEqual(true);319 console.debug("====>ActsAccountAddAccount_1500 end====");320 done();321 });322 });323 /*324 * @tc.number : ActsAccountAddAccount_1600325 * @tc.name : Add account promise form326 * @tc.desc : The account name is a special character such as a space327 */328 it('ActsAccountAddAccount_1600', 0, async function (done) {329 console.debug("====>ActsAccountAddAccount_1600 start====");330 var appAccountManager = account.createAppAccountManager();331 var specialStr = " ";332 try{333 await appAccountManager.addAccount(specialStr, "account_extraInfo_promise_eighth");334 }335 catch(err){336 console.debug("====>add Account ActsAccountAddAccount_1600 err:" + JSON.stringify(err));337 expect(err.code != 0).assertEqual(true);338 console.debug("====>ActsAccountAddAccount_1600 end====");339 done();340 }341 });342 /*343 * @tc.number : ActsAccountAddAccount_1700344 * @tc.name : Add account calllback form345 * @tc.desc : The account name is a special string346 */347 it('ActsAccountAddAccount_1700', 0, async function (done) {348 console.debug("====>ActsAccountAddAccount_1700 start====");349 var appAccountManager = account.createAppAccountManager();350 var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";351 appAccountManager.addAccount(specialStr, "account_extraInfo_callback_ninth", (err)=>{352 console.debug("====>add account ActsAccountAddAccount_1700 err:" + JSON.stringify(err));353 expect(err.code).assertEqual(0);354 appAccountManager.deleteAccount(specialStr, (err)=>{355 console.debug("====>delete Account ActsAccountAddAccount_1700 err" + JSON.stringify(err));356 expect(err.code).assertEqual(0);357 console.debug("====>ActsAccountAddAccount_1700 end====");358 done();359 });360 });361 });362 /*363 * @tc.number : ActsAccountAddAccount_1800364 * @tc.name : Add account promise form365 * @tc.desc : The account name is a special string366 */367 it('ActsAccountAddAccount_1800', 0, async function (done) {368 console.debug("====>ActsAccountAddAccount_1800 start====");369 var appAccountManager = account.createAppAccountManager();370 var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";371 console.debug("====>add account ActsAccountAddAccount_1800====");372 try{373 await appAccountManager.addAccount(specialStr, "account_extraInfo_promise_ninth");374 }375 catch(err){376 console.error("====>add Account ActsAccountAddAccount_1800 err:" + JSON.stringify(err));377 expect().assertFail();378 done();379 }380 console.debug("====>delete account ActsAccountAddAccount_1800====");381 await appAccountManager.deleteAccount(specialStr);382 console.debug("====>ActsAccountAddAccount_1800 end====");383 done();384 });385 /*386 * @tc.number : ActsAccountAddAccount_1900387 * @tc.name : Add account calllback form388 * @tc.desc : Additional information is a special character such as a space389 */390 it('ActsAccountAddAccount_1900', 0, async function (done) {391 console.debug("====>ActsAccountAddAccount_1900 start====");392 var appAccountManager = account.createAppAccountManager();393 var specialStr = " ";394 appAccountManager.addAccount("account_name_callback_tenth", specialStr, (err)=>{395 console.debug("====>add account ActsAccountAddAccount_1900 err:" + JSON.stringify(err));396 expect(err.code).assertEqual(0);397 appAccountManager.deleteAccount("account_name_callback_tenth", (err)=>{398 console.debug("====>delete Account ActsAccountAddAccount_1900 err" + JSON.stringify(err));399 expect(err.code).assertEqual(0);400 console.debug("====>ActsAccountAddAccount_1900 end====");401 done();402 });403 });404 });405 /*406 * @tc.number : ActsAccountAddAccount_2000407 * @tc.name : Add account promise form408 * @tc.desc : Additional information is a special character such as a space409 */410 it('ActsAccountAddAccount_2000', 0, async function (done) {411 console.debug("====>ActsAccountAddAccount_2000 start====");412 var appAccountManager = account.createAppAccountManager();413 var specialStr = " ";414 console.debug("====>add account ActsAccountAddAccount_2000====");415 try{416 await appAccountManager.addAccount("account_name_promise_tenth", specialStr);417 }418 catch(err){419 console.error("====>add Account ActsAccountAddAccount_2000 err:" + JSON.stringify(err));420 expect().assertFail();421 done();422 }423 console.debug("====>delete account ActsAccountAddAccount_2000====");424 await appAccountManager.deleteAccount("account_name_promise_tenth");425 console.debug("====>ActsAccountAddAccount_2000 end====");426 done();427 });428 /*429 * @tc.number : ActsAccountAddAccount_2100430 * @tc.name : Add account calllback form431 * @tc.desc : Additional information is a special string432 */433 it('ActsAccountAddAccount_2100', 0, async function (done) {434 console.debug("====>ActsAccountAddAccount_2100 start====");435 var appAccountManager = account.createAppAccountManager();436 var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";437 appAccountManager.addAccount("account_extraInfo_callback_eleventh", specialStr, (err)=>{438 console.debug("====>add account ActsAccountAddAccount_2100 err:" + JSON.stringify(err));439 expect(err.code).assertEqual(0);440 appAccountManager.deleteAccount("account_extraInfo_callback_eleventh", (err)=>{441 console.debug("====>delete Account ActsAccountAddAccount_2100 err" + JSON.stringify(err));442 expect(err.code).assertEqual(0);443 console.debug("====>ActsAccountAddAccount_2100 end====");444 done();445 });446 });447 });448 /*449 * @tc.number : ActsAccountAddAccount_2200450 * @tc.name : Add account promise form451 * @tc.desc : Additional information is a special string452 */453 it('ActsAccountAddAccount_2200', 0, async function (done) {454 console.debug("====>ActsAccountAddAccount_2200 start====");455 var appAccountManager = account.createAppAccountManager();456 var specialStr = "#@$%^&*()_+!<>~?,./[]abcdefgABCDEFG1234567890";457 console.debug("====>add account ActsAccountAddAccount_2200====");458 try{459 await appAccountManager.addAccount("account_extraInfo_promise_eleventh", specialStr);460 }461 catch(err){462 console.error("====>add Account ActsAccountAddAccount_2200 err:" + JSON.stringify(err));463 expect().assertFail();464 done();465 }466 console.debug("====>delete account ActsAccountAddAccount_2200====");467 await appAccountManager.deleteAccount("account_extraInfo_promise_eleventh");468 console.debug("====>ActsAccountAddAccount_2200 end====");469 done();470 });471 /*472 * @tc.number : ActsAccountAddAccount_2300473 * @tc.name : Add account calllback form474 * @tc.desc : Repeatedly add accounts with the same name and different additional information475 */476 it('ActsAccountAddAccount_2300', 0, async function (done) {477 console.debug("====>ActsAccountAddAccount_2300 start====");478 var appAccountManager = account.createAppAccountManager();479 appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback", (err)=>{480 console.debug("====>add account first time ActsAccountAddAccount_2300 err:" + JSON.stringify(err));481 expect(err.code).assertEqual(0);482 appAccountManager.addAccount("account_name_callback_same", "account_extraInfo_callback_different", (err)=>{483 console.debug("====>add account second time ActsAccountAddAccount_2300 err:" + JSON.stringify(err));484 expect(err.code != 0).assertEqual(true);485 appAccountManager.deleteAccount("account_name_callback_same", (err)=>{486 console.debug("====>delete Account ActsAccountAddAccount_2300 err:" + JSON.stringify(err));487 expect(err.code).assertEqual(0);488 console.debug("====>ActsAccountAddAccount_2300 end====");489 done();490 });491 });492 });493 });494 /*495 * @tc.number : ActsAccountAddAccount_2400496 * @tc.name : Add account promise form497 * @tc.desc : Repeatedly add accounts with the same name and different additional information498 */499 it('ActsAccountAddAccount_2400', 0, async function (done) {500 console.debug("====>ActsAccountAddAccount_2400 start====");501 var appAccountManager = account.createAppAccountManager();502 console.debug("====>add account for the first time ActsAccountAddAccount_2400====");503 await appAccountManager.addAccount("account_name_promise_same", "account_extraInfo_promise");504 console.debug("====>add account for the second time ActsAccountAddAccount_2400====");505 try{506 await appAccountManager.addAccount("account_name_promise_same", "account_extraInfo_promise_different");507 }508 catch(err){509 console.debug("====>add account for the second time err:" + JSON.stringify(err));510 expect(err.code != 0).assertEqual(true);511 appAccountManager.deleteAccount("account_name_promise_same"); 512 console.debug("====>ActsAccountAddAccount_2400 end====");513 done();514 }515 });516 /*517 * @tc.number : ActsAccountAddAccount_2500518 * @tc.name : Add account calllback form519 * @tc.desc : The account name reaches the limit of 512 characters520 */521 it('ActsAccountAddAccount_2500', 0, async function (done) {522 console.debug("====>ActsAccountAddAccount_2500 start====");523 var limitName = '';524 for (var i = 0; i < NAMELIMIT; i++) {525 limitName += 't';526 }527 var appAccountManager = account.createAppAccountManager();528 appAccountManager.addAccount(limitName, "account_extraInfo_callback", (err)=>{529 console.debug("====>add account ActsAccountAddAccount_2500 err:" + JSON.stringify(err));530 expect(err.code).assertEqual(0);531 appAccountManager.deleteAccount(limitName, (err)=>{532 console.debug("====>delete Account ActsAccountAddAccount_2500 err:" + JSON.stringify(err));533 expect(err.code).assertEqual(0);534 console.debug("====>ActsAccountAddAccount_2500 end====");535 done();536 });537 });538 });539 /*540 * @tc.number : ActsAccountAddAccount_2600541 * @tc.name : Add account promise form542 * @tc.desc : The account name reaches the limit of 512 characters543 */544 it('ActsAccountAddAccount_2600', 0, async function (done) {545 console.debug("====>ActsAccountAddAccount_2600 start====");546 var nameLimit = '';547 for (var i = 0; i < NAMELIMIT; i++) {548 nameLimit += 't';549 }550 var appAccountManager = account.createAppAccountManager();551 console.debug("====>add account ActsAccountAddAccount_2600 start====");552 try{553 await appAccountManager.addAccount(nameLimit, "account_extraInfo_promise");554 }555 catch(err){556 console.error("====>add account ActsAccountAddAccount_2600 err:" + JSON.stringify(err));557 expect().assertFail();558 done();559 }560 console.debug("====>delete account ActsAccountAddAccount_2600 start====");561 await appAccountManager.deleteAccount(nameLimit);562 console.debug("====>ActsAccountAddAccount_2600 end====");563 done();564 });565 /*566 * @tc.number : ActsAccountAddAccount_2700567 * @tc.name : Add account calllback form568 * @tc.desc : Additional information reaches the limit of 1024 characters569 */570 it('ActsAccountAddAccount_2700', 0, async function (done) {571 console.debug("====>ActsAccountAddAccount_2700 start====");572 var limitExtra = '';573 for (var i = 0; i < LENGTHLIMIT; i++) {574 limitExtra += 't';575 }576 var appAccountManager = account.createAppAccountManager();577 appAccountManager.addAccount("account_extra_callback_limit", limitExtra, (err)=>{578 console.debug("====>add account ActsAccountAddAccount_2700 err:" + JSON.stringify(err));579 expect(err.code).assertEqual(0);580 appAccountManager.deleteAccount("account_extra_callback_limit", (err)=>{581 console.debug("====>delete Account ActsAccountAddAccount_2700 err:" + JSON.stringify(err));582 expect(err.code).assertEqual(0);583 console.debug("====>ActsAccountAddAccount_2700 end====");584 done();585 });586 });587 });588 /*589 * @tc.number : ActsAccountAddAccount_2800590 * @tc.name : Add account promise form591 * @tc.desc : Additional information reaches the limit of 1024 characters592 */593 it('ActsAccountAddAccount_2800', 0, async function (done) {594 console.debug("====>ActsAccountAddAccount_2800 start====");595 var extraLimit = '';596 for (var i = 0; i < LENGTHLIMIT; i++) {597 extraLimit += 't';598 }599 var appAccountManager = account.createAppAccountManager();600 try{601 await appAccountManager.addAccount("account_extra_promise_limit", extraLimit);602 }603 catch(err){604 console.error("====>add account ActsAccountAddAccount_2800 err:" + JSON.stringify(err));605 expect().assertFail();606 done();607 }608 console.debug("====>delete account ActsAccountAddAccount_2800 start====");609 appAccountManager.deleteAccount("account_extra_promise_limit");610 console.debug("====>ActsAccountAddAccount_2800 end====");611 done();612 });...
klotho.js
Source:klotho.js
1addC("1,2-dichloroethane.pdb","meta")2addC("1,3-bisphospho-D-glycerate.pdb","carb")3addC("17-alpha-hydroxyprogesterone.pdb","steroid")4addC("1-L-myo-inositol-5-phosphate.pdb","carb")5addC("2,3-bisphospho-D-glycerate.pdb","carb")6addC("2,3-diketo-L-gulonate.pdb","carb")7addC("2,4-dihydroxy-6-amino-1,3,5-triazine.pdb","nucl")8addC("2,4-dihydroxy-6-N-ethyl-amino-1,3,5-triazine.pdb","nucl")9addC("21-deoxycortisol.pdb","steroid")10addC("2-amino-2-deoxy-D-glucose.pdb","carb")11addC("2-chloro-4,6-diamino-1,3,5-triazine.pdb","nucl")12addC("2-chloro-4,6-dihydroxy-1,3,5-triazine.pdb","nucl")13addC("2-chloro-4-hydroxy-6-amino-1,3,5-triazine.pdb","nucl")14addC("2-chloroethanol.pdb","meta")15addC("2-hydroxy-2-yl-glutarate.pdb","carb")16addC("2-hydroxy-4,6-diamino-1,3,5-triazine.pdb","nucl")17addC("2-hydroxyglutarate.pdb","carb")18addC("2-hydroxyglutarate_thiamine-pyrophosphate.pdb","cofactor")19addC("2-keto-3-deoxy-D-arabino-heptulosonate-7-phosphate.pdb","carb")20addC("2-keto-3-deoxy-D-glucarate.pdb","carb")21addC("2-keto-3-deoxy-D-gluconate.pdb","carb")22addC("2-keto-L-gulono-1,4-lactone.pdb","carb")23addC("2-methyl-4-amino-5-hydroxymethyl-pyrimidine.pdb","nucl")24addC("2-methyl-4-amino-5-methandiyl-pyrimidine.pdb","nucl")25addC("2-phospho-D-glycerate.pdb","carb")26addC("2R,3S-isocitrate.pdb","meta")27addC("3-amino-isobutyrate.pdb","meta")28addC("3-dehydroquinate.pdb","meta")29addC("3-dehydroshikimate.pdb","meta")30addC("3-keto-adipate.pdb","meta")31addC("3-keto-adipyl-CoA.pdb","meta")32addC("3-keto-L-gulonate.pdb","carb")33addC("3-ketothreonate.pdb","carb")34addC("3-methyladenine.pdb","nucl")35addC("3-phospho-D-glycerate.pdb","carb")36addC("4-hydroxybutyr-4-yl_acid.pdb","meta")37addC("4-hydroxybutyric_acid_thiamine-pyrophosphate.pdb","cofactor")38addC("4-methyl-5-2-hydroxyethyl-thiazole.pdb","meta")39addC("5,6-dihydrouracil.pdb","nucl")40addC("5-amino-4-imidazolecarboxamideriboside-5-triphosphate.pdb","meta")41addC("5-amino-4-imidazolylcarboxamide.pdb","meta")42addC("5-aminoimidazol-1-yl-4-carboxylate.pdb","meta")43addC("5-aminoimidazole.pdb","meta")44addC("5-aminoimidazole-4-carboxylate.pdb","meta")45addC("5-beta-perhydrocyclopentanophenanthrene.pdb","steroid")46addC("5-bromouracil.pdb","nucl")47addC("5-enolpyruvylshikimate-3-phosphate.pdb","meta")48addC("5-hydroxymethylcytosine.pdb","nucl")49addC("5-keto-4-deoxy-D-glucarate.pdb","carb")50addC("5-methylcytosine.pdb","nucl")51addC("5-phospho-alpha-D-ribosyl-1-pyrophosphate.pdb","carb")52addC("5-phosphoribosyl-4-carboxamide-5-aminoimidazole.pdb","nucl")53addC("5-phosphoribosyl-4-carboxamide-5-formamidoimidazole.pdb","nucl")54addC("5-phosphoribosyl-4-N-succinocarboxamide-5-aminoimidazole.pdb","nucl")55addC("5-phosphoribosyl-5-aminoimidazole.pdb","nucl")56addC("5-phosphoribosyl-5-aminoimidazole-4-carboxylate.pdb","nucl")57addC("5-phosphoribosyl-glycinamide.pdb","nucl")58addC("5-phosphoribosyl-N-formylglycinamide.pdb","nucl")59addC("5-phosphoribosyl-N-formylglycinamidine.pdb","nucl")60addC("5-phosphoryl-beta-D-ribosylamine.pdb","carb")61addC("6-deoxy-alpha-D-allopyranose.pdb","carb")62addC("6-deoxy-alpha-D-altropyranose.pdb","carb")63addC("6-deoxy-alpha-D-glucopyranose.pdb","carb")64addC("6-deoxy-alpha-D-gulopyranose.pdb","carb")65addC("6-deoxy-alpha-D-idopyranose.pdb","carb")66addC("6-deoxy-alpha-D-talopyranose.pdb","carb")67addC("6-deoxy-alpha-L-talopyranose.pdb","carb")68addC("6-deoxy-beta-D-allopyranose.pdb","carb")69addC("6-deoxy-beta-D-altropyranose.pdb","carb")70addC("6-deoxy-beta-D-glucopyranose.pdb","carb")71addC("6-deoxy-beta-D-gulopyranose.pdb","carb")72addC("6-deoxy-beta-D-idopyranose.pdb","carb")73addC("6-deoxy-beta-D-talopyranose.pdb","carb")74addC("6-deoxy-D-allose.pdb","carb")75addC("6-deoxy-D-altrose.pdb","carb")76addC("6-deoxy-D-glucose.pdb","carb")77addC("6-deoxy-D-gulose.pdb","carb")78addC("6-deoxy-D-talose.pdb","carb")79addC("6-deoxy-L-talose.pdb","carb")80addC("8-azaguanine.pdb","nucl")81addC("8-oxy-caffeine.pdb","meta")82addC("acetate.pdb","meta")83addC("acetyl-CoA.pdb","meta")84addC("adenine.pdb","nucl")85addC("adenosine.pdb","nucl")86addC("ADP.pdb","nucl")87addC("aldosterone.pdb","steroid")88addC("alpha-D-allo-heptulopyranose.pdb","carb")89addC("alpha-D-allopyranose.pdb","carb")90addC("alpha-D-arabinofuranose.pdb","carb")91addC("alpha-D-arabinopyranose.pdb","carb")92addC("alpha-D-erythrofuranose.pdb","carb")93addC("alpha-D-erythro-pentulofuranose.pdb","carb")94addC("alpha-D-fructofuranose.pdb","carb")95addC("alpha-D-fucopyranose.pdb","carb")96addC("alpha-D-galactopyranose.pdb","carb")97addC("alpha-D-galacturonopyranose.pdb","carb")98addC("alpha-D-galacturonopyranose-1-phosphate.pdb","carb")99addC("alpha-D-glucopyranose.pdb","carb")100addC("alpha-D-glucuronopyranose.pdb","carb")101addC("alpha-D-glucuronopyranose-1-phosphate.pdb","carb")102addC("alpha-D-gulopyranose.pdb","carb")103addC("alpha-D-idopyranose.pdb","carb")104addC("alpha-D-lyxofuranose.pdb","carb")105addC("alpha-D-lyxopyranose.pdb","carb")106addC("alpha-D-mannopyranose.pdb","carb")107addC("alpha-D-psicopyranose.pdb","carb")108addC("alpha-D-rhamnopyranose.pdb","carb")109addC("alpha-D-ribofuranose.pdb","carb")110addC("alpha-D-ribopyranose.pdb","carb")111addC("alpha-D-sedoheptulopyranose.pdb","carb")112addC("alpha-D-tagatopyranose.pdb","carb")113addC("alpha-D-talo-heptulopyranose.pdb","carb")114addC("alpha-D-talopyranose.pdb","carb")115addC("alpha-D-threofuranose.pdb","carb")116addC("alpha-D-xylofuranose.pdb","carb")117addC("alpha-D-xylopyranose.pdb","carb")118addC("alpha-D-xylopyranose-1-phosphate.pdb","carb")119addC("alpha-ketoglutaramate.pdb","carb")120addC("alpha-ketoglutarate.pdb","carb")121addC("alpha-L-arabinopyranose.pdb","carb")122addC("alpha-L-erythrofuranose.pdb","carb")123addC("alpha-L-fucopyranose.pdb","carb")124addC("alpha-L-galactopyranose.pdb","carb")125addC("alpha-L-lyxopyranose.pdb","carb")126addC("alpha-L-rhamnopyranose.pdb","carb")127addC("alpha-L-ribopyranose.pdb","carb")128addC("alpha-L-sorbopyranose.pdb","carb")129addC("alpha-L-threofuranose.pdb","carb")130addC("alpha-L-xylopyranose.pdb","carb")131addC("aminoacid_D_backbone.pdb","amino")132addC("aminoacid_L_backbone.pdb","amino")133addC("AMP.pdb","nucl")134addC("anthranilate.pdb","meta")135addC("arachidate.pdb","lipid")136addC("arachidonate.pdb","lipid")137addC("ATP.pdb","nucl")138addC("atrazine.pdb","meta")139addC("barbiturate.pdb","meta")140addC("behenate.pdb","lipid")141addC("beta-D-allopyranose.pdb","carb")142addC("beta-D-altro-3-heptulopyranose.pdb","carb")143addC("beta-D-arabinofuranose.pdb","carb")144addC("beta-D-arabinopyranose.pdb","carb")145addC("beta-D-erythrofuranose.pdb","carb")146addC("beta-D-fructofuranose.pdb","carb")147addC("beta-D-fructofuranose-1,6-bisphosphate.pdb","carb")148addC("beta-D-fructofuranose-6-phosphate.pdb","carb")149addC("beta-D-fructopyranose.pdb","carb")150addC("beta-D-fucopyranose.pdb","carb")151addC("beta-D-galactopyranose.pdb","carb")152addC("beta-D-glucopyranose.pdb","carb")153addC("beta-D-glucopyranose-1,6-bisphosphate.pdb","carb")154addC("beta-D-glucopyranose-1-phosphate.pdb","carb")155addC("beta-D-glucopyranose-6-phosphate.pdb","carb")156addC("beta-D-gulopyranose.pdb","carb")157addC("beta-D-idopyranose.pdb","carb")158addC("beta-D-lyxofuranose.pdb","carb")159addC("beta-D-lyxopyranose.pdb","carb")160addC("beta-D-manno-heptulopyranose.pdb","carb")161addC("beta-D-mannopyranose.pdb","carb")162addC("beta-D-rhamnopyranose.pdb","carb")163addC("beta-D-ribofuranose.pdb","carb")164addC("beta-D-ribopyranose.pdb","carb")165addC("beta-D-tagatopyranose.pdb","carb")166addC("beta-D-talopyranose.pdb","carb")167addC("beta-D-threofuranose.pdb","carb")168addC("beta-D-threo-pentulofuranose.pdb","carb")169addC("beta-D-xylopyranose.pdb","carb")170addC("beta-estradiol.pdb","steroid")171addC("beta-L-arabinopyranose.pdb","carb")172addC("beta-L-arabinopyranose-1-phosphate.pdb","carb")173addC("beta-L-erythrofuranose.pdb","carb")174addC("beta-L-lyxopyranose.pdb","carb")175addC("beta-L-ribopyranose.pdb","carb")176addC("beta-L-threofuranose.pdb","carb")177addC("beta-L-xylopyranose.pdb","carb")178addC("beta-mercaptoethylamine.pdb","meta")179addC("biuret.pdb","meta")180addC("caffeine.pdb","meta")181addC("cAMP.pdb","nucl")182addC("catechol.pdb","meta")183addC("CDP.pdb","nucl")184addC("ceramide.pdb","lipid")185addC("chloroacetaldehyde.pdb","meta")186addC("chloroacetic_acid.pdb","meta")187addC("choline.pdb","meta")188addC("chorismate.pdb","meta")189addC("cis-aconitate.pdb","meta")190addC("citrate.pdb","meta")191addC("CMP.pdb","nucl")192addC("coenzymeA.pdb","cofactor")193addC("corticosterone.pdb","steroid")194addC("cortisol.pdb","steroid")195addC("CTP.pdb","nucl")196addC("cyanuric_acid.pdb","meta")197addC("cytidine.pdb","nucl")198addC("cytosine.pdb","nucl")199addC("D-3-allohydroxyproline.pdb","amino")200addC("D3HI_HUMAN.pdb","peptide")201addC("D-3-hydroxyproline.pdb","amino")202addC("D-4-allohydroxyproline.pdb","amino")203addC("D-4-hydroxyproline.pdb","amino")204addC("dADP.pdb","nucl")205addC("D-alanine.pdb","amino")206addC("D-allo-heptulose.pdb","carb")207addC("D-allose.pdb","carb")208addC("D-altrose.pdb","carb")209addC("dAMP.pdb","nucl")210addC("D-arabinose.pdb","carb")211addC("D-arginine.pdb","amino")212addC("D-asparagine.pdb","amino")213addC("D-aspartate.pdb","amino")214addC("dATP.pdb","nucl")215addC("dCDP.pdb","nucl")216addC("dCMP.pdb","nucl")217addC("dCTP.pdb","nucl")218addC("D-cysteine.pdb","amino")219addC("deethylatrazine.pdb","meta")220addC("deoxyadenosine.pdb","nucl")221addC("deoxycytidine.pdb","nucl")222addC("deoxyguanosine.pdb","nucl")223addC("deoxyinosine.pdb","nucl")224addC("deoxyuridine.pdb","nucl")225addC("deoxyxanthosine.pdb","nucl")226addC("D-erythrose.pdb","carb")227addC("D-erythrulose.pdb","carb")228addC("D-fructose.pdb","carb")229addC("D-fucose.pdb","carb")230addC("D-galactose.pdb","carb")231addC("dGDP.pdb","nucl")232addC("D-glucarate.pdb","carb")233addC("D-glucitol.pdb","carb")234addC("D-gluconate.pdb","carb")235addC("D-glucose.pdb","carb")236addC("D-glucuronate.pdb","carb")237addC("D-glucurono-3,6-lactone.pdb","carb")238addC("D-glutamate.pdb","amino")239addC("D-glutamine.pdb","amino")240addC("D-glyceraldehyde.pdb","carb")241addC("D-glyceraldehyde-3-phosphate.pdb","carb")242addC("D-glycerate.pdb","carb")243addC("D-glycero-alpha-D-gluco-heptopyranose.pdb","carb")244addC("D-glycero-alpha-D-manno-heptopyranose.pdb","carb")245addC("D-glycero-beta-D-manno-heptopyranose.pdb","carb")246addC("D-glycero-D-galacto-heptose.pdb","carb")247addC("D-glycero-D-gluco-heptose.pdb","carb")248addC("D-glycero-D-manno-heptose.pdb","carb")249addC("dGMP.pdb","nucl")250addC("dGTP.pdb","nucl")251addC("D-gulose.pdb","carb")252addC("D-histidine.pdb","amino")253addC("D-idose.pdb","carb")254addC("dIDP.pdb","nucl")255addC("dihydro-thymine.pdb","cofactor")256addC("dihydroxyacetone.pdb","carb")257addC("dihydroxyacetone_phosphate.pdb","carb")258addC("dIMP.pdb","nucl")259addC("D-isoleucine.pdb","amino")260addC("dITP.pdb","nucl")261addC("D-leucine.pdb","amino")262addC("D-lysine.pdb","amino")263addC("D-lyxose.pdb","carb")264addC("D-manno-heptulose.pdb","carb")265addC("D-mannose.pdb","carb")266addC("D-methionine.pdb","amino")267addC("D-phenylalanine.pdb","amino")268addC("D-proline.pdb","amino")269addC("D-psicose.pdb","carb")270addC("D-ribose.pdb","carb")271addC("D-ribulose.pdb","carb")272addC("D-serine.pdb","amino")273addC("D-sorbose.pdb","carb")274addC("D-tagatose.pdb","carb")275addC("D-talo-heptulose.pdb","carb")276addC("D-talose.pdb","carb")277addC("D-tartarate.pdb","meta")278addC("D-threonine.pdb","amino")279addC("D-threose.pdb","carb")280addC("D-tryptophan.pdb","amino")281addC("D-tyrosine.pdb","amino")282addC("dUDP.pdb","nucl")283addC("dUMP.pdb","nucl")284addC("dUTP.pdb","nucl")285addC("D-valine.pdb","amino")286addC("dXDP.pdb","nucl")287addC("dXMP.pdb","nucl")288addC("dXTP.pdb","nucl")289addC("D-xylose.pdb","carb")290addC("D-xylulose.pdb","carb")291addC("EOSI_HUMAN.pdb","peptide")292addC("estrone.pdb","steroid")293addC("ethylamine.pdb","meta")294addC("FAD.pdb","cofactor")295addC("formate.pdb","meta")296addC("formyl-CoA.pdb","meta")297addC("fumarate.pdb","meta")298addC("GDP.pdb","nucl")299addC("glycerol.pdb","carb")300addC("glycine.pdb","amino")301addC("glycolate.pdb","carb")302addC("glyoxylate.pdb","carb")303addC("glyphosate.pdb","carb")304addC("GMP.pdb","nucl")305addC("GRWM_HUMAN.pdb","peptide")306addC("GTP.pdb","nucl")307addC("guanine.pdb","nucl")308addC("guanosine.pdb","nucl")309addC("H2O.pdb","meta")310addC("hydroxyatrazine.pdb","meta")311addC("hypoxanthine.pdb","nucl")312addC("IDP.pdb","nucl")313addC("imidazole.pdb","meta")314addC("IMP.pdb","nucl")315addC("inosine.pdb","nucl")316addC("isopropylammelide.pdb","meta")317addC("itaconate.pdb","meta")318addC("ITP.pdb","nucl")319addC("L-3-allohydroxyproline.pdb","amino")320addC("L-3-hydroxyproline.pdb","amino")321addC("L-4-allohydroxyproline.pdb","amino")322addC("L-4-hydroxyproline.pdb","amino")323addC("L-alanine.pdb","amino")324addC("L-arabinose.pdb","carb")325addC("L-arabitol.pdb","carb")326addC("L-arginine.pdb","amino")327addC("L-ascorbate.pdb","meta")328addC("L-asparagine.pdb","amino")329addC("L-aspartate.pdb","amino")330addC("laurate.pdb","lipid")331addC("L-cysteine.pdb","amino")332addC("L-dehydroascorbate.pdb","meta")333addC("L-erythroascorbate.pdb","meta")334addC("L-erythrose.pdb","carb")335addC("L-fucose.pdb","carb")336addC("L-glucarate.pdb","carb")337addC("L-glutamate.pdb","amino")338addC("L-glutamine.pdb","amino")339addC("L-glyceraldehyde.pdb","carb")340addC("L-glycerate.pdb","carb")341addC("L-glycero-D-manno-heptose.pdb","carb")342addC("L-glycerol-3-phosphate.pdb","carb")343addC("L-gulitol.pdb","carb")344addC("L-gulonate.pdb","carb")345addC("L-gulono-1,4-lactone.pdb","carb")346addC("L-gulose.pdb","carb")347addC("L-histidine.pdb","amino")348addC("lignocerate.pdb","lipid")349addC("linoleate.pdb","lipid")350addC("linolenate.pdb","lipid")351addC("L-isoleucine.pdb","amino")352addC("L-leucine.pdb","amino")353addC("L-lysine.pdb","amino")354addC("L-lyxonate.pdb","carb")355addC("L-malate.pdb","carb")356addC("L-methionine.pdb","amino")357addC("L-phenylalanine.pdb","amino")358addC("L-proline.pdb","amino")359addC("L-rhamnose.pdb","carb")360addC("L-ribulose.pdb","carb")361addC("L-ribulose-5-phosphate.pdb","carb")362addC("L-serine.pdb","amino")363addC("L-sorbose.pdb","carb")364addC("L-tartarate.pdb","meta")365addC("L-threonate.pdb","carb")366addC("L-threonine.pdb","amino")367addC("L-threose.pdb","carb")368addC("L-tryptophan.pdb","amino")369addC("L-tyrosine.pdb","amino")370addC("L-valine.pdb","amino")371addC("L-xylonate.pdb","carb")372addC("L-xylulose-5-phosphate.pdb","carb")373addC("malonate.pdb","meta")374addC("meso-tartarate.pdb","meta")375addC("muconate.pdb","meta")376addC("myo-inositol.pdb","carb")377addC("myo-inosose-2.pdb","carb")378addC("myristate.pdb","lipid")379addC("N10-formyl-5,6,7,8-tetrahydrofolate.pdb","cofactor")380addC("N5,N10-methenyl-5,6,7,8-tetrahydrofolate.pdb","cofactor")381addC("N5,N10-methylene-5,6,7,8-tetrahydrofolate.pdb","cofactor")382addC("N5-formimino-5,6,7,8-tetrahydrofolate.pdb","cofactor")383addC("N5-formyl-5,6,7,8-tetrahydrofolate.pdb","cofactor")384addC("N5-methyl-5,6,7,8-tetrahydrofolate.pdb","cofactor")385addC("N-acetyl-D-glucosamine.pdb","carb")386addC("N-acetyl-D-glucosamine-1-phosphate.pdb","carb")387addC("N-acetyl-D-glucosamine-1-yl.pdb","carb")388addC("N-acetyl-D-mannosamine.pdb","carb")389addC("N-acetyl-D-mannosamine-6-phosphate.pdb","carb")390addC("N-acetyl-neuraminate.pdb","carb")391addC("N-acetyl-neuraminate-9-phosphate.pdb","carb")392addC("NAD+.pdb","cofactor")393addC("NADH.pdb","cofactor")394addC("NADP+.pdb","cofactor")395addC("NADPH.pdb","cofactor")396addC("N-methyl-acetamide.pdb","meta")397addC("oleate.pdb","lipid")398addC("orotate.pdb","nucl")399addC("orotidine-5-phosphate.pdb","nucl")400addC("oxalate.pdb","meta")401addC("oxaloacetate.pdb","meta")402addC("oxalosuccinate.pdb","meta")403addC("oxalyl.pdb","meta")404addC("oxalyl-CoA.pdb","meta")405addC("palmitate.pdb","lipid")406addC("palmitoleate.pdb","lipid")407addC("PBP_HUMAN.pdb","peptide")408addC("peptide_backbone.pdb","amino")409addC("peptide_end.pdb","amino")410addC("peptide_start.pdb","amino")411addC("perhydrocyclopentanophenanthrene.pdb","steroid")412addC("phosphoenolpyruvate.pdb","meta")413addC("Pi.pdb","meta")414addC("prephenate.pdb","meta")415addC("progesterone.pdb","steroid")416addC("purine.pdb","nucl")417addC("pyrimidine.pdb","nucl")418addC("pyrimidinyl.pdb","nucl")419addC("pyruvate.pdb","meta")420addC("quinate.pdb","meta")421addC("riboflavin.pdb","cofactor")422addC("ribosylthymine.pdb","nucl")423addC("R-pantothenate.pdb","cofactor")424addC("rTDP.pdb","nucl")425addC("rTMP.pdb","nucl")426addC("rTTP.pdb","nucl")427addC("sarcosine.pdb","amino")428addC("sedoheptulose.pdb","carb")429addC("shikimate.pdb","meta")430addC("shikimate-3-phosphate.pdb","meta")431addC("sphingomyelin.pdb","lipid")432addC("sphingosine.pdb","lipid")433addC("stearate.pdb","lipid")434addC("stearyl-linolenyl-phosphatidate.pdb","lipid")435addC("stearyl-oleyl-phosphatidylcholine.pdb","lipid")436addC("succinyl-CoA.pdb","meta")437addC("TDP.pdb","nucl")438addC("testosterone.pdb","steroid")439addC("tetrahydrofolate.pdb","cofactor")440addC("theobromine.pdb","nucl")441addC("theophylline.pdb","nucl")442addC("thiamine.pdb","cofactor")443addC("thiamine-pyrophosphate.pdb","cofactor")444addC("thymidine.pdb","nucl")445addC("thymine.pdb","nucl")446addC("TMP.pdb","nucl")447addC("TTP.pdb","nucl")448addC("TUFT_HUMAN.pdb","peptide")449addC("UDP.pdb","nucl")450addC("UDP-alpha-D-galacturonopyranose.pdb","carb_nucl")451addC("UDP-alpha-D-glucuronopyranose.pdb","carb_nucl")452addC("UDP-alpha-D-xylopyranose.pdb","carb_nucl")453addC("UDP-beta-L-arabinopyranose.pdb","carb_nucl")454addC("UDP-N-acetyl-alpha-D-glucosaminopyranose.pdb","carb_nucl")455addC("UMP.pdb","nucl")456addC("UMP-nonresonant-terminal-oxygen.pdb","nucl")457addC("uracil.pdb","nucl")458addC("uracyl.pdb","nucl")459addC("urea.pdb","meta")460addC("uric_acid.pdb","nucl")461addC("uridine.pdb","nucl")462addC("UTP.pdb","nucl")463addC("xanthine.pdb","nucl")464addC("xanthosine.pdb","nucl")465addC("XDP.pdb","nucl")466addC("XMP.pdb","nucl")467addC("XTP.pdb","nucl")...
add_subtract.js
Source:add_subtract.js
...9 a.hours(6);10 a.minutes(7);11 a.seconds(8);12 a.milliseconds(500);13 test.equal(a.add({ms: 50}).milliseconds(), 550, 'Add milliseconds');14 test.equal(a.add({s: 1}).seconds(), 9, 'Add seconds');15 test.equal(a.add({m: 1}).minutes(), 8, 'Add minutes');16 test.equal(a.add({h: 1}).hours(), 7, 'Add hours');17 test.equal(a.add({d: 1}).date(), 13, 'Add date');18 test.equal(a.add({w: 1}).date(), 20, 'Add week');19 test.equal(a.add({M: 1}).month(), 10, 'Add month');20 test.equal(a.add({y: 1}).year(), 2012, 'Add year');21 b = moment([2010, 0, 31]).add({M: 1});22 c = moment([2010, 1, 28]).subtract({M: 1});23 test.equal(b.month(), 1, 'add month, jan 31st to feb 28th');24 test.equal(b.date(), 28, 'add month, jan 31st to feb 28th');25 test.equal(c.month(), 0, 'subtract month, feb 28th to jan 28th');26 test.equal(c.date(), 28, 'subtract month, feb 28th to jan 28th');27 test.done();28 },29 "add long" : function (test) {30 test.expect(8);31 var a = moment();32 a.year(2011);33 a.month(9);34 a.date(12);35 a.hours(6);36 a.minutes(7);37 a.seconds(8);38 a.milliseconds(500);39 test.equal(a.add({milliseconds: 50}).milliseconds(), 550, 'Add milliseconds');40 test.equal(a.add({seconds: 1}).seconds(), 9, 'Add seconds');41 test.equal(a.add({minutes: 1}).minutes(), 8, 'Add minutes');42 test.equal(a.add({hours: 1}).hours(), 7, 'Add hours');43 test.equal(a.add({days: 1}).date(), 13, 'Add date');44 test.equal(a.add({weeks: 1}).date(), 20, 'Add week');45 test.equal(a.add({months: 1}).month(), 10, 'Add month');46 test.equal(a.add({years: 1}).year(), 2012, 'Add year');47 test.done();48 },49 "add long singular" : function (test) {50 test.expect(8);51 var a = moment();52 a.year(2011);53 a.month(9);54 a.date(12);55 a.hours(6);56 a.minutes(7);57 a.seconds(8);58 a.milliseconds(500);59 test.equal(a.add({millisecond: 50}).milliseconds(), 550, 'Add milliseconds');60 test.equal(a.add({second: 1}).seconds(), 9, 'Add seconds');61 test.equal(a.add({minute: 1}).minutes(), 8, 'Add minutes');62 test.equal(a.add({hour: 1}).hours(), 7, 'Add hours');63 test.equal(a.add({day: 1}).date(), 13, 'Add date');64 test.equal(a.add({week: 1}).date(), 20, 'Add week');65 test.equal(a.add({month: 1}).month(), 10, 'Add month');66 test.equal(a.add({year: 1}).year(), 2012, 'Add year');67 test.done();68 },69 "add string long" : function (test) {70 test.expect(9);71 var a = moment(), b;72 a.year(2011);73 a.month(9);74 a.date(12);75 a.hours(6);76 a.minutes(7);77 a.seconds(8);78 a.milliseconds(500);79 b = a.clone();80 test.equal(a.add('millisecond', 50).milliseconds(), 550, 'Add milliseconds');81 test.equal(a.add('second', 1).seconds(), 9, 'Add seconds');82 test.equal(a.add('minute', 1).minutes(), 8, 'Add minutes');83 test.equal(a.add('hour', 1).hours(), 7, 'Add hours');84 test.equal(a.add('day', 1).date(), 13, 'Add date');85 test.equal(a.add('week', 1).date(), 20, 'Add week');86 test.equal(a.add('month', 1).month(), 10, 'Add month');87 test.equal(a.add('year', 1).year(), 2012, 'Add year');88 test.equal(b.add('day', '01').date(), 13, 'Add date');89 test.done();90 },91 "add string long singular" : function (test) {92 test.expect(9);93 var a = moment(), b;94 a.year(2011);95 a.month(9);96 a.date(12);97 a.hours(6);98 a.minutes(7);99 a.seconds(8);100 a.milliseconds(500);101 b = a.clone();102 test.equal(a.add('milliseconds', 50).milliseconds(), 550, 'Add milliseconds');103 test.equal(a.add('seconds', 1).seconds(), 9, 'Add seconds');104 test.equal(a.add('minutes', 1).minutes(), 8, 'Add minutes');105 test.equal(a.add('hours', 1).hours(), 7, 'Add hours');106 test.equal(a.add('days', 1).date(), 13, 'Add date');107 test.equal(a.add('weeks', 1).date(), 20, 'Add week');108 test.equal(a.add('months', 1).month(), 10, 'Add month');109 test.equal(a.add('years', 1).year(), 2012, 'Add year');110 test.equal(b.add('days', '01').date(), 13, 'Add date');111 test.done();112 },113 "add string short" : function (test) {114 test.expect(8);115 var a = moment();116 a.year(2011);117 a.month(9);118 a.date(12);119 a.hours(6);120 a.minutes(7);121 a.seconds(8);122 a.milliseconds(500);123 test.equal(a.add('ms', 50).milliseconds(), 550, 'Add milliseconds');124 test.equal(a.add('s', 1).seconds(), 9, 'Add seconds');125 test.equal(a.add('m', 1).minutes(), 8, 'Add minutes');126 test.equal(a.add('h', 1).hours(), 7, 'Add hours');127 test.equal(a.add('d', 1).date(), 13, 'Add date');128 test.equal(a.add('w', 1).date(), 20, 'Add week');129 test.equal(a.add('M', 1).month(), 10, 'Add month');130 test.equal(a.add('y', 1).year(), 2012, 'Add year');131 test.done();132 },133 "add string long reverse args" : function (test) {134 test.expect(8);135 var a = moment();136 a.year(2011);137 a.month(9);138 a.date(12);139 a.hours(6);140 a.minutes(7);141 a.seconds(8);142 a.milliseconds(500);143 test.equal(a.add(50, 'millisecond').milliseconds(), 550, 'Add milliseconds');144 test.equal(a.add(1, 'second', 1).seconds(), 9, 'Add seconds');145 test.equal(a.add(1, 'minute', 1).minutes(), 8, 'Add minutes');146 test.equal(a.add(1, 'hour', 1).hours(), 7, 'Add hours');147 test.equal(a.add(1, 'day', 1).date(), 13, 'Add date');148 test.equal(a.add(1, 'week', 1).date(), 20, 'Add week');149 test.equal(a.add(1, 'month', 1).month(), 10, 'Add month');150 test.equal(a.add(1, 'year', 1).year(), 2012, 'Add year');151 test.done();152 },153 "add string long singular reverse args" : function (test) {154 test.expect(8);155 var a = moment();156 a.year(2011);157 a.month(9);158 a.date(12);159 a.hours(6);160 a.minutes(7);161 a.seconds(8);162 a.milliseconds(500);163 test.equal(a.add(50, 'milliseconds').milliseconds(), 550, 'Add milliseconds');164 test.equal(a.add(1, 'seconds').seconds(), 9, 'Add seconds');165 test.equal(a.add(1, 'minutes').minutes(), 8, 'Add minutes');166 test.equal(a.add(1, 'hours').hours(), 7, 'Add hours');167 test.equal(a.add(1, 'days').date(), 13, 'Add date');168 test.equal(a.add(1, 'weeks').date(), 20, 'Add week');169 test.equal(a.add(1, 'months').month(), 10, 'Add month');170 test.equal(a.add(1, 'years').year(), 2012, 'Add year');171 test.done();172 },173 "add string short reverse args" : function (test) {174 test.expect(8);175 var a = moment();176 a.year(2011);177 a.month(9);178 a.date(12);179 a.hours(6);180 a.minutes(7);181 a.seconds(8);182 a.milliseconds(500);183 test.equal(a.add(50, 'ms').milliseconds(), 550, 'Add milliseconds');184 test.equal(a.add(1, 's').seconds(), 9, 'Add seconds');185 test.equal(a.add(1, 'm').minutes(), 8, 'Add minutes');186 test.equal(a.add(1, 'h').hours(), 7, 'Add hours');187 test.equal(a.add(1, 'd').date(), 13, 'Add date');188 test.equal(a.add(1, 'w').date(), 20, 'Add week');189 test.equal(a.add(1, 'M').month(), 10, 'Add month');190 test.equal(a.add(1, 'y').year(), 2012, 'Add year');191 test.done();192 },193 "add across DST" : function (test) {194 test.expect(3);195 var a = moment(new Date(2011, 2, 12, 5, 0, 0)),196 b = moment(new Date(2011, 2, 12, 5, 0, 0)),197 c = moment(new Date(2011, 2, 12, 5, 0, 0)),198 d = moment(new Date(2011, 2, 12, 5, 0, 0));199 a.add('days', 1);200 b.add('hours', 24);201 c.add('months', 1);202 test.equal(a.hours(), 5, 'adding days over DST difference should result in the same hour');203 if (b.isDST() && !d.isDST()) {204 test.equal(b.hours(), 6, 'adding hours over DST difference should result in a different hour');205 } else if (!b.isDST() && d.isDST()) {206 test.equal(b.hours(), 4, 'adding hours over DST difference should result in a different hour');207 } else {208 test.equal(b.hours(), 5, 'adding hours over DST difference should result in a same hour if the timezone does not have daylight savings time');209 }210 test.equal(c.hours(), 5, 'adding months over DST difference should result in the same hour');211 test.done();212 }...
custom_se_async.js
Source:custom_se_async.js
1// This JavaScript was developed by GA-Experts (http://www.ga-experts.co.uk) for Google Analytics2// Please use this code to overwrite the default set of Search Engines in the GA tracking code3// Use this code at your own risk. GA Experts takes no responsibility for errors, loss of data or any other complications arising from the use of this code4// Version 2.0 (Mar 2007) - many thanks to Brian Clifton and Tomas Remotigue for help with this5// For enquiries please contact mail@ga-experts.co.uk6// Dutch Search Engines added by Joost de Valk (http://www.joostdevalk.nl)7// For enquiries specifically about the Dutch SE's please contact joost@joostdevalk.nl8// Google EMEA Image domains9_gaq.push(10 ['_addOrganic','images.google.co.uk','q'],11 ['_addOrganic','images.google.es','q'],12 ['_addOrganic','images.google.pt','q'],13 ['_addOrganic','images.google.it','q'],14 ['_addOrganic','images.google.fr','q'],15 ['_addOrganic','images.google.nl','q'],16 ['_addOrganic','images.google.be','q'],17 ['_addOrganic','images.google.de','q'],18 ['_addOrganic','images.google.no','q'],19 ['_addOrganic','images.google.se','q'],20 ['_addOrganic','images.google.dk','q'],21 ['_addOrganic','images.google.fi','q'],22 ['_addOrganic','images.google.ch','q'],23 ['_addOrganic','images.google.at','q'],24 ['_addOrganic','images.google.ie','q'],25 ['_addOrganic','images.google.ru','q'],26 ['_addOrganic','images.google.pl','q']27);28// Other Google Image search29_gaq.push(30 ['_addOrganic','images.google.com','q'],31 ['_addOrganic','images.google.ca','q'],32 ['_addOrganic','images.google.com.au','q'],33 ['_addOrganic','images.google','q']34);35// Blogsearch36_gaq.push(37 ['_addOrganic','blogsearch.google','q']38);39// Google EMEA Domains40_gaq.push(41 ['_addOrganic','google.co.uk','q'],42 ['_addOrganic','google.es','q'],43 ['_addOrganic','google.pt','q'],44 ['_addOrganic','google.it','q'],45 ['_addOrganic','google.fr','q'],46 ['_addOrganic','google.nl','q'],47 ['_addOrganic','google.be','q'],48 ['_addOrganic','google.de','q'],49 ['_addOrganic','google.no','q'],50 ['_addOrganic','google.se','q'],51 ['_addOrganic','google.dk','q'],52 ['_addOrganic','google.fi','q'],53 ['_addOrganic','google.ch','q'],54 ['_addOrganic','google.at','q'],55 ['_addOrganic','google.ie','q'],56 ['_addOrganic','google.ru','q'],57 ['_addOrganic','google.pl','q']58);59// Yahoo EMEA Domains60_gaq.push(61 ['_addOrganic','uk.yahoo.com','p'],62 ['_addOrganic','es.yahoo.com','p'],63 ['_addOrganic','pt.yahoo.com','p'],64 ['_addOrganic','it.yahoo.com','p'],65 ['_addOrganic','fr.yahoo.com','p'],66 ['_addOrganic','nl.yahoo.com','p'],67 ['_addOrganic','be.yahoo.com','p'],68 ['_addOrganic','de.yahoo.com','p'],69 ['_addOrganic','no.yahoo.com','p'],70 ['_addOrganic','se.yahoo.com','p'],71 ['_addOrganic','dk.yahoo.com','p'],72 ['_addOrganic','fi.yahoo.com','p'],73 ['_addOrganic','ch.yahoo.com','p'],74 ['_addOrganic','at.yahoo.com','p'],75 ['_addOrganic','ie.yahoo.com','p'],76 ['_addOrganic','ru.yahoo.com','p'],77 ['_addOrganic','pl.yahoo.com','p']78);79// UK specific80_gaq.push(81 ['_addOrganic','hotbot.co.uk','query'],82 ['_addOrganic','excite.co.uk','q'],83 ['_addOrganic','bbc','q'],84 ['_addOrganic','tiscali','query'],85 ['_addOrganic','uk.ask.com','q'],86 ['_addOrganic','blueyonder','q'],87 ['_addOrganic','search.aol.co.uk','query'],88 ['_addOrganic','ntlworld','q'],89 ['_addOrganic','tesco.net','q'],90 ['_addOrganic','orange.co.uk','q'],91 ['_addOrganic','mywebsearch.com','searchfor'],92 ['_addOrganic','uk.myway.com','searchfor'],93 ['_addOrganic','searchy.co.uk','search_term'],94 ['_addOrganic','msn.co.uk','q'],95 ['_addOrganic','uk.altavista.com','q'],96 ['_addOrganic','lycos.co.uk','query']97);98// NL specific99_gaq.push(100 ['_addOrganic','chello.nl','q1'],101 ['_addOrganic','home.nl','q'],102 ['_addOrganic','planet.nl','googleq=q'],103 ['_addOrganic','search.ilse.nl','search_for'],104 ['_addOrganic','search-dyn.tiscali.nl','key'],105 ['_addOrganic','startgoogle.startpagina.nl','q'],106 ['_addOrganic','vinden.nl','q'],107 ['_addOrganic','vindex.nl','search_for'],108 ['_addOrganic','zoeken.nl','query'],109 ['_addOrganic','zoeken.track.nl','qr'],110 ['_addOrganic','zoeknu.nl','Keywords']111);112// Extras113_gaq.push(114 ['_addOrganic','alltheweb','q'],115 ['_addOrganic','ananzi','qt'],116 ['_addOrganic','anzwers','search'],117 ['_addOrganic','araby.com','q'],118 ['_addOrganic','dogpile','q'],119 ['_addOrganic','elmundo.es','q'],120 ['_addOrganic','ezilon.com','q'],121 ['_addOrganic','hotbot','query'],122 ['_addOrganic','indiatimes.com','query'],123 ['_addOrganic','iafrica.funnel.co.za','q'],124 ['_addOrganic','mywebsearch.com','searchfor'],125 ['_addOrganic','rambler.ru','words'],126 ['_addOrganic','search.aol.com','encquery'],127 ['_addOrganic','search.indiatimes.com','query'],128 ['_addOrganic','searcheurope.com','query'],129 ['_addOrganic','suche.web.de','su'],130 ['_addOrganic','terra.es','query'],131 ['_addOrganic','voila.fr','kw']...
exampleconfig.js
Source:exampleconfig.js
1var hide_empty_list=true;23addListGroup("vehicles", "car-makers");45addList("car-makers", "Select a maker", "", "dummy-maker");6addList("car-makers", "Toyota", "Toyota", "Toyota");7addList("car-makers", "Honda", "Honda", "Honda");8addList("car-makers", "Chrysler", "Chrysler", "Chrysler", 1);910addList("dummy-maker", "Not available", "", "dummy-car");1112addOption("dummy-car", "Not available", "");1314addList("Toyota", "Select vehicle type", "", "dummy-toyota");15addList("Toyota", "Cars", "car", "Toyota-Cars");16addList("Toyota", "SUVs/Van", "suv", "Toyota-SUVs/Van");17addList("Toyota", "Trucks", "truck", "Toyota-Trucks", 1);1819addOption("dummy-toyota", "Not available", "");2021addOption("Toyota-Cars", "Select a model", "");22addOption("Toyota-Cars", "Avalon", "Avalon");23addOption("Toyota-Cars", "Camry", "Camry");24addOption("Toyota-Cars", "Celica", "Celica");25addOption("Toyota-Cars", "Corolla", "Corolla");26addOption("Toyota-Cars", "ECHO", "ECHO");2728addOption("Toyota-SUVs/Van", "Select a model", "");29addOption("Toyota-SUVs/Van", "4Runner", "4Runner");30addOption("Toyota-SUVs/Van", "Highlander", "Highlander");31addOption("Toyota-SUVs/Van", "Land Cruiser", "Land Cruiser");32addOption("Toyota-SUVs/Van", "RAV4", "RAV4");3334addOption("Toyota-Trucks", "Select a model", "");35addOption("Toyota-Trucks", "Tacoma", "Tacoma");36addOption("Toyota-Trucks", "Tundra", "Tundra", 1);3738addList("Honda", "Select vehicle type", "", "dummy-honda");39addList("Honda", "Cars", "car", "Honda-Cars");40addList("Honda", "SUVs/Van", "suv", "Honda-SUVs/Van", 1);4142addOption("dummy-honda", "Not available", "");4344addOption("Honda-Cars", "Select a model", "");45addOption("Honda-Cars", "Accord Sedan", "Accord Sedan");46addOption("Honda-Cars", "Accord Coupe", "Accord Coupe");47addOption("Honda-Cars", "Civic Sedan", "Civic Sedan");48addOption("Honda-Cars", "Civic Coupe", "Civic Coupe");49addOption("Honda-Cars", "Civic Hybrid", "Civic Hybrid");5051addOption("Honda-SUVs/Van", "Select a model", "");52addOption("Honda-SUVs/Van", "CR-V", "CR-V");53addOption("Honda-SUVs/Van", "Pilot", "Pilot");54addOption("Honda-SUVs/Van", "Odyssey", "Odyssey", 1);5556addList("Chrysler", "Select vehicle type", "", "dummy-chrysler");57addList("Chrysler", "Cars", "car", "Chrysler-Cars", 1);58addList("Chrysler", "SUVs/Van", "suv", "Chrysler-SUVs/Van");5960addOption("dummy-chrysler", "Not available", "");6162addOption("Chrysler-Cars", "Select a model", "");63addOption("Chrysler-Cars", "300M", "300M");64addOption("Chrysler-Cars", "PT Cruiser", "PT Cruiser", 1);65addOption("Chrysler-Cars", "Concorde", "Concorde");66addOption("Chrysler-Cars", "Sebring Coupe", "Sebring Coupe");6768addOption("Chrysler-SUVs/Van", "Select a model", "");69addOption("Chrysler-SUVs/Van", "Town & Country", "Town & Country");
...
exampleconfig2.js
Source:exampleconfig2.js
1//var hide_empty_list=true; //uncomment this line to hide empty selection lists2var disable_empty_list=true; //uncomment this line to disable empty selection lists34addListGroup("vehicles", "car-makers");56addOption("car-makers", "Select a maker", "", "", 1); //Empty starter option7addList("car-makers", "Toyota", "Toyota", "Toyota");8addList("car-makers", "Honda", "Honda", "Honda");9addList("car-makers", "Chrysler", "Chrysler", "Chrysler");1011addOption("Toyota", "Select vehicle type", "", "", 1); //Empty starter option12addList("Toyota", "Cars", "car", "Toyota-Cars");13addList("Toyota", "SUVs/Van", "suv", "Toyota-SUVs/Van");14addList("Toyota", "Trucks", "truck", "Toyota-Trucks");1516addOption("Toyota-Cars", "Select a model", "");17addOption("Toyota-Cars", "Avalon", "Avalon");18addOption("Toyota-Cars", "Camry", "Camry");19addOption("Toyota-Cars", "Celica", "Celica");20addOption("Toyota-Cars", "Corolla", "Corolla");21addOption("Toyota-Cars", "ECHO", "ECHO");2223addOption("Toyota-SUVs/Van", "Select a model", "");24addOption("Toyota-SUVs/Van", "4Runner", "4Runner");25addOption("Toyota-SUVs/Van", "Highlander", "Highlander");26addOption("Toyota-SUVs/Van", "Land Cruiser", "Land Cruiser");27addOption("Toyota-SUVs/Van", "RAV4", "RAV4");2829addOption("Toyota-Trucks", "Select a model", "");30addOption("Toyota-Trucks", "Tacoma", "Tacoma");31addOption("Toyota-Trucks", "Tundra", "Tundra", 1);3233addOption("Honda", "Select vehicle type", "", "", 1); //Empty starter option34addList("Honda", "Cars", "car", "Honda-Cars");35addList("Honda", "SUVs/Van", "suv", "Honda-SUVs/Van");3637addOption("Honda-Cars", "Select a model", "");38addOption("Honda-Cars", "Accord Sedan", "Accord Sedan");39addOption("Honda-Cars", "Accord Coupe", "Accord Coupe");40addOption("Honda-Cars", "Civic Sedan", "Civic Sedan");41addOption("Honda-Cars", "Civic Coupe", "Civic Coupe");42addOption("Honda-Cars", "Civic Hybrid", "Civic Hybrid");4344addOption("Honda-SUVs/Van", "Select a model", "");45addOption("Honda-SUVs/Van", "CR-V", "CR-V");46addOption("Honda-SUVs/Van", "Pilot", "Pilot");47addOption("Honda-SUVs/Van", "Odyssey", "Odyssey", 1);4849addOption("Chrysler", "Select vehicle type", "", "", 1); //Empty starter option50addList("Chrysler", "Cars", "car", "Chrysler-Cars");51addList("Chrysler", "SUVs/Van", "suv", "Chrysler-SUVs/Van");5253addOption("Chrysler-Cars", "Select a model", "");54addOption("Chrysler-Cars", "300M", "300M");55addOption("Chrysler-Cars", "PT Cruiser", "PT Cruiser", 1);56addOption("Chrysler-Cars", "Concorde", "Concorde");57addOption("Chrysler-Cars", "Sebring Coupe", "Sebring Coupe");5859addOption("Chrysler-SUVs/Van", "Select a model", "");60addOption("Chrysler-SUVs/Van", "Town & Country", "Town & Country");
...
Using AI Code Generation
1const { add } = require("qawolf");2const { chromium } = require("playwright-chromium");3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 await page.click("input[name=q]");8 await page.fill("input[name=q]", "qawolf");9 await page.press("input[name=q]", "Enter");10 await page.click("text=QAWolf: Record and run automated browser tests");11 await page.click("text=Docs");12 await page.click("text=Installation");
Using AI Code Generation
1const { add } = require("qawolf");2const { chromium } = require("playwright");3jest.setTimeout(30000);4let browser;5let page;6beforeAll(async () => {7 browser = await chromium.launch();8});9afterAll(async () => {10 await browser.close();11});12beforeEach(async () => {13 page = await browser.newPage();14});15afterEach(async () => {16 await page.close();17});18test("test", async () => {19 await page.click('input[name="q"]');20 await page.fill('input[name="q"]', "Hello World");21 await page.press('input[name="q"]', "Enter");22 await page.click("text=Hello World");23});
Using AI Code Generation
1const { add } = require("qawolf");2test("test", async () => {3 const browser = await qawolf.launch();4 const page = await browser.newPage();5 await page.type('[name="q"]', "qawolf");6 await page.keyboard.press("Enter");7 await page.waitForSelector(".LC20lb");8 await page.click(".LC20lb");9 await page.waitForSelector("h1");10 await add(page, "test");11 await browser.close();12});13const qawolf = require("qawolf");14const selectors = require("./test.selectors");15test("test", async () => {16 const browser = await qawolf.launch();17 const page = await browser.newPage();18 await page.click(selectors["h1"]);19 await qawolf.stopVideos();20 await browser.close();21});
Using AI Code Generation
1const qawolf = require("qawolf");2const browser = await qawolf.launch();3const context = await browser.newContext();4const page = await context.newPage();5await qawolf.create();6await page.click("input[type=\"text\"]");7await page.fill("input[type=\"text\"]", "qawolf");8await page.click("text=Google Search");9await page.click("text=QA Wolf: Test automation for web apps");10await qawolf.scroll(page, "html", { x: 0, y: 0 });11await page.click("text=QA Wolf: Test automation for web apps");12await page.click("text=About");13await qawolf.scroll(page, "html", { x: 0, y: 0 });14await page.click("text=About");15await page.click("text=Features");16await qawolf.scroll(page, "html", { x: 0, y: 0 });17await page.click("text=Features");18await page.click("text=Documentation");19await qawolf.scroll(page, "html", { x: 0, y: 0 });20await page.click("text=Documentation");21await page.click("text=Blog");22await qawolf.scroll(page, "html", { x: 0, y: 0 });23await page.click("text=Blog");24await page.click("text=Sign up");25await qawolf.scroll(page, "html", { x: 0, y: 0 });26await page.click("text=Sign up");27await page.click("text=Sign in");28await qawolf.scroll(page, "html", { x: 0, y: 0 });29await page.click("text=Sign in");30await page.click("text=GitHub");31await qawolf.scroll(page, "html", { x: 0, y: 0 });32await page.click("text=GitHub");33await page.click("text=Twitter");34await qawolf.scroll(page, "html", { x: 0, y: 0 });35await page.click("text=Twitter");36await page.click("text=LinkedIn");37await qawolf.scroll(page, "html", { x: 0, y: 0 });38await page.click("text=LinkedIn");39await qawolf.stopVideos();40await browser.close();
Using AI Code Generation
1await qawolf.add(page, "test");2await qawolf.click(page, "test");3await qawolf.type(page, "test");4await qawolf.select(page, "test", "test");5await qawolf.check(page, "test");6await qawolf.uncheck(page, "test");
Using AI Code Generation
1await qawolf.create({2 code: `const { chromium } = require("playwright");3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.click("input[name="q"]");7 await page.fill("input[name="q"]", "hello world");8 await page.click("input[name="btnK"]");9 await page.click("text="Images"");10 await page.click("text="Videos"");11 await page.click("text="Shopping"");12 await page.click("text="News"");13 await page.click("text="Maps"");14 await page.click("text="Books"");15 await page.click("text="Gmail"");16 await page.click("text="Drive"");17 await page.click("text="Calendar"");18 await page.click("text="Translate"");19 await page.click("text="Photos"");20 await page.click("text="Shopping"");21 await page.click("text="More"");22 await page.click("text="Search tools"");23 await page.click("text="Settings"");24 await page.click("text="Sign in"");25 await browser.close();26});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!