-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: history view now uses temp svn fs (#814)
- Loading branch information
1 parent
ad0b561
commit c31eb21
Showing
6 changed files
with
76 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as assert from "assert"; | ||
import { Uri } from "vscode"; | ||
import { tempSvnFs } from "../temp_svn_fs"; | ||
import { join } from "path"; | ||
|
||
suite("Test temp svn fs", () => { | ||
test("Temp files matches expected", async () => { | ||
const svnUri = Uri.parse("http://example.com/svn/test/trunk/test.js"); | ||
|
||
const revisionUri = await tempSvnFs.createTempSvnRevisionFile( | ||
svnUri, | ||
"30", | ||
"test content" | ||
); | ||
|
||
assert.equal(revisionUri.fsPath, join('/', '1181ae15a77d83ac0b077051dfed21ed', 'r30_test.js')); | ||
}); | ||
|
||
test("Temp file is created", async () => { | ||
const svnUri = Uri.parse("http://example.com/svn/test/trunk/test.js"); | ||
|
||
const uri = await tempSvnFs.createTempSvnRevisionFile( | ||
svnUri, | ||
"30", | ||
"test content" | ||
); | ||
|
||
assert.ok(tempSvnFs.stat(uri)); | ||
}); | ||
|
||
test("Temp contents are correct", async () => { | ||
const svnUri = Uri.parse("http://example.com/svn/test/trunk/test.js"); | ||
|
||
const revisionUri = await tempSvnFs.createTempSvnRevisionFile( | ||
svnUri, | ||
"30", | ||
"test content" | ||
); | ||
|
||
assert.equal(tempSvnFs.readFile(revisionUri), "test content"); | ||
}); | ||
}); |