Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b0ee55

Browse files
author
John Haley
committed
Updated diff workdir with index test
1 parent97a8e38 commit2b0ee55

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎test/tests/diff.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ describe("Diff", function() {
8888
it.only("can diff the workdir with index",function(){
8989
varpatches=this.workdirDiff.patches();
9090
assert.equal(patches.length,1);
91+
assert(patches[0].isUntracked());
9192

92-
varhunks=patches[0].hunks();
93-
assert.equal(hunks.length,1);
93+
varoldFile=patches[0].delta.oldFile();
94+
assert.equal(oldFile.path(),"wddiff.txt");
95+
assert.equal(oldFile.size(),0);
9496

95-
varlines=hunks[0].lines();
96-
assert.equal(
97-
lines[0].content().substr(0,lines[0].contentLen()),
98-
"1 line\n"
99-
);
97+
varnewFile=patches[0].delta.newFile();
98+
assert.equal(newFile.path(),"wddiff.txt");
99+
assert.equal(newFile.size(),23);
100100
});
101101

102102
it("can diff with a null tree",function(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp