Permalink
Browse files

version 0.1.0 almost ready

  • Loading branch information...
1 parent 3e30d15 commit 0f17a16c4728a583b886ac5a140b4822d74c8773 @Marak Marak committed Sep 18, 2010
Showing with 31 additions and 27 deletions.
  1. +10 −24 ReadMe.md
  2. +0 −2 demo.js
  3. +16 −0 package.json
  4. +5 −1 test/exec-test.js
View
@@ -1,21 +1,10 @@
-<pre>
- _
- | |
- _ __ ___ __ __ _ __ ___ ___ | |_
-| '_ \ / _ \\ \/ /| '_ \ / _ \ / __|| __|
-| | | || __/ > < | |_) || __/| (__ | |_
-|_| |_| \___|/_/\_\| .__/ \___| \___| \__|
- | |
- |_|
-</pre>
+#nexpect
-nexpect is a node.js module for spawning child applications and seamlessly controlling them using javascript callbacks. nexpect can be used for automating terminal applications such as ssh, ftp, passwd, telnet, etc. nExpect is based on the ideas of the Expect library by Don
-Libes and the pexpect library by Noah Spurrier.
+nexpect is a node.js module for spawning child applications (such as ssh) and seamlessly controlling them using javascript callbacks. nexpect is based on the ideas of the [expect][0] library by Don Libes and the [pexpect][1] library by Noah Spurrier.
+## why
-It can be used to a automate setup
-scripts for duplicating software package installations on different servers. It
-can be used for automated software testing.
+node.js has good built in control for spawning child processes. nexpect builds on these core methods and allows developers to easily pipe data to child processes and assert the expected response. nexpect also chains, so you can compose complex terminal interactions.
## installation
@@ -29,7 +18,7 @@ can be used for automated software testing.
npm install nexpect
</pre>
-# usage
+## usage
console.log('echo hello');
nexpect.spawn("echo hello")
@@ -65,12 +54,9 @@ can be used for automated software testing.
# authors
+[Elijah Insua][2] and [Marak Squires][3]
-
-tmpvar and Marak
-
-
-[]
-
-http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod
-http://pexpect.sourceforge.net/pexpect.html
+[0]: http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod "expect"
+[1]: http://pexpect.sourceforge.net/pexpect.html "pexpect"
+[2]: http://github.com/tmpvar "Elijah Insua"
+[3]: http://github.com/marak "Marak Squires"
View
@@ -2,7 +2,6 @@
var nexpect = require('./lib/nexpect').nspawn;
-console.log('echo hello');
nexpect.spawn("echo hello")
.expect("hello")
.run(function(err) {
@@ -11,7 +10,6 @@ nexpect.spawn("echo hello")
}
});
-console.log('ls -al /tmp/undefined');
nexpect.spawn("ls -al /tmp/undefined")
.expect("No such file or directory")
.run(function(err) {
View
@@ -0,0 +1,16 @@
+{
+ "name": "nexpect",
+ "description": "spawns and interacts with child processes using spawn / expect commands",
+ "version": "0.1.0",
+ "author": "Elijah Insua <tmpvar@gmail.com>",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/nodejitsu/nexpect.git"
+ },
+ "keywords": ["nexpect", "spawn", "child process", "terminal"],
+ "dependencies": {
+ },
+ "main": "./lib/nexpect",
+ "scripts": { "test": "vows" },
+ "engines": { "node": ">= 0.2.0" }
+}
View
@@ -1,3 +1,5 @@
+/* not implemented
+
var sys = require('sys'),
events = require('events'),
assert = require('assert'),
@@ -10,11 +12,13 @@ var sys = require('sys'),
vows.describe('noc/terminal-exec').addBatch({
"When executing commands on the terminal": {
"and you run ls with DIRNAME": {
- topic: nspawn.spawn('ls -a'),
+ topic: nspawn.spawn('ls test -a'),
"you should see the current path": function(result){
eyes.inspect(result);
assert.equal( result, 'exec-test.js');
}
}
}
}).export(module);
+
+*/

0 comments on commit 0f17a16

Please sign in to comment.