Tue 27 Aug 00:14:56 CEST 2024
This commit is contained in:
		
							parent
							
								
									6263811e88
								
							
						
					
					
						commit
						08f4c2b2e6
					
				
							
								
								
									
										25
									
								
								test/test-jamshlib.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								test/test-jamshlib.js
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					var Shell = require('../build/jamsh/libjamsh.debug.js')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var options = {
 | 
				
			||||||
 | 
					  modules : {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  nameopts : {length:8, memorable:true, lowercase:true},
 | 
				
			||||||
 | 
					  Nameopts : {length:8, memorable:true, uppercase:true},
 | 
				
			||||||
 | 
					  output : function (msg) {
 | 
				
			||||||
 | 
					    console.log('[LOG] '+msg); 
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  outputAgent : function (msg) {
 | 
				
			||||||
 | 
					    console.log('[AGE] '+msg); 
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  outputAsync : function (msg) {
 | 
				
			||||||
 | 
					    console.log('[ASN] '+msg); 
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  server : true,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					var cmd = Shell(options).init().cmd();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cmd.port(DIR.IP('http://localhost:10001'));
 | 
				
			||||||
 | 
					cmd.start()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cmd.exec('stats("vm")');
 | 
				
			||||||
 | 
					cmd.exec('stats("conn")');
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user