Skip to content

Commit 107f3ff

Browse files
committed
Merge pull request nwjs#1362 from kingFighter/tests
[tset] update snapshot and crash dump
2 parents 0216a88 + 273ff85 commit 107f3ff

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

tests/automatic_tests/crash_dump/mocha_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe('crash dump', function() {
3434

3535
it('should work fine', function() {
3636
assert.equal(result.length, 1);
37-
var r = result[0].indexOf("renderer");
38-
assert.equal(r, -1);
37+
var r = result[0].indexOf("dmp");
38+
assert.notEqual(r, -1);
3939
});
4040

4141
})
@@ -58,7 +58,7 @@ describe('crash dump', function() {
5858

5959
it('should work fine', function() {
6060
assert.equal(result.length, 2);
61-
var r = result[1].indexOf("renderer");
61+
var r = result[1].indexOf("dmp");
6262
assert.notEqual(r, -1);
6363
});
6464
})

tests/automatic_tests/snapshot/mocha_test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ describe('snapshot', function() {
6666
})
6767
})
6868

69-
describe('another demo should work fine', function() {
69+
describe('1266-snapshot-crash-start', function() {
7070
before(function(done) {
7171
cp.execFile(snapshotPath,
7272
['--extra_code', 'file_to_snapshot_to_app.bin.js', 'app.bin'],
73-
{cwd:'./' + global.tests_dir + '/snapshot/test-snapshot-app/'},
73+
{cwd:'./' + global.tests_dir + '/snapshot/1266-snapshot-crash-start/'},
7474
function (error, stdout, stderr) {
7575
done();
7676
}
@@ -79,18 +79,18 @@ describe('snapshot', function() {
7979
})
8080

8181
after(function() {
82-
fs.unlink(path.join(global.tests_dir, 'snapshot','test-snapshot-app', 'app.bin'), function(err) {if(err && err.code !== 'ENOENT') throw err});
83-
fs.unlink(path.join(global.tests_dir, 'snapshot','test-snapshot-app', 'v8.log'), function(err) {if(err && err.code !== 'ENOENT') throw err});
84-
fs.unlink(path.join(global.tests_dir, 'snapshot','test-snapshot-app','tmp'), function(err) {if(err && err.code !== 'ENOENT') throw err});
82+
fs.unlink(path.join(global.tests_dir, 'snapshot','1266-snapshot-crash-start', 'app.bin'), function(err) {if(err && err.code !== 'ENOENT') throw err});
83+
fs.unlink(path.join(global.tests_dir, 'snapshot','1266-snapshot-crash-start', 'v8.log'), function(err) {if(err && err.code !== 'ENOENT') throw err});
84+
fs.unlink(path.join(global.tests_dir, 'snapshot','1266-snapshot-crash-start','tmp'), function(err) {if(err && err.code !== 'ENOENT') throw err});
8585
})
8686

8787
it('another demo should close nomally', function(done) {
8888
this.timeout(0);
89-
var ppath = process.execPath + " " + path.join(global.tests_dir, 'snapshot', 'test-snapshot-app');
89+
var ppath = process.execPath + " " + path.join(global.tests_dir, 'snapshot', '1266-snapshot-crash-start');
9090
cp.exec(ppath, function(err, stdout, stderr) {
9191
});
9292
setTimeout(function(){
93-
fs.exists(path.join(global.tests_dir, 'snapshot','test-snapshot-app', 'tmp'), function(exists) {
93+
fs.exists(path.join(global.tests_dir, 'snapshot','1266-snapshot-crash-start', 'tmp'), function(exists) {
9494
if (exists)
9595
done();
9696
else

0 commit comments

Comments
 (0)