| 
									
										
										
										
											2012-09-19 14:22:55 -06:00
										 |  |  | /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/ | 
					
						
							| 
									
										
										
										
											2011-09-08 22:18:42 -06:00
										 |  |  | (function () { | 
					
						
							|  |  |  |   "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   var atob = require('./index') | 
					
						
							| 
									
										
										
										
											2011-09-09 14:56:22 -06:00
										 |  |  |     , encoded = "SGVsbG8gV29ybGQ=" | 
					
						
							|  |  |  |     , unencoded = "Hello World" | 
					
						
							| 
									
										
										
										
											2012-09-19 14:22:55 -06:00
										 |  |  |   /* | 
					
						
							|  |  |  |     , encoded = "SGVsbG8sIBZM" | 
					
						
							|  |  |  |     , unencoded = "Hello, 世界" | 
					
						
							|  |  |  |   */ | 
					
						
							| 
									
										
										
										
											2011-09-08 22:18:42 -06:00
										 |  |  |     ; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-09 14:56:22 -06:00
										 |  |  |   if (unencoded !== atob(encoded)) { | 
					
						
							| 
									
										
										
										
											2012-09-19 14:22:55 -06:00
										 |  |  |     console.log('[FAIL]', unencoded, atob(encoded)); | 
					
						
							| 
									
										
										
										
											2011-09-08 22:18:42 -06:00
										 |  |  |     return; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   console.log('[PASS] all tests pass'); | 
					
						
							|  |  |  | }()); |