Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e9ed5e19
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e9ed5e19
编写于
8月 07, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
towards scheme-enforcement in URIs, related to #55891
上级
9b7c16e0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
137 deletion
+21
-137
src/vs/base/common/uri.ts
src/vs/base/common/uri.ts
+6
-0
src/vs/base/test/common/network.test.ts
src/vs/base/test/common/network.test.ts
+0
-92
src/vs/base/test/common/uri.test.ts
src/vs/base/test/common/uri.test.ts
+9
-39
src/vs/platform/markers/test/common/markerService.test.ts
src/vs/platform/markers/test/common/markerService.test.ts
+6
-6
未找到文件。
src/vs/base/common/uri.ts
浏览文件 @
e9ed5e19
...
@@ -12,6 +12,12 @@ const _singleSlashStart = /^\//;
...
@@ -12,6 +12,12 @@ const _singleSlashStart = /^\//;
const
_doubleSlashStart
=
/^
\/\/
/
;
const
_doubleSlashStart
=
/^
\/\/
/
;
function
_validateUri
(
ret
:
URI
):
void
{
function
_validateUri
(
ret
:
URI
):
void
{
// // scheme, must be set
// if (!ret.scheme) {
// throw new Error('[UriError]: Scheme is missing.');
// }
// scheme, https://tools.ietf.org/html/rfc3986#section-3.1
// scheme, https://tools.ietf.org/html/rfc3986#section-3.1
// ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
// ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
if
(
ret
.
scheme
&&
!
_schemePattern
.
test
(
ret
.
scheme
))
{
if
(
ret
.
scheme
&&
!
_schemePattern
.
test
(
ret
.
scheme
))
{
...
...
src/vs/base/test/common/network.test.ts
已删除
100644 → 0
浏览文件 @
9b7c16e0
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
*
as
assert
from
'
assert
'
;
import
URI
from
'
vs/base/common/uri
'
;
function
assertUrl
(
raw
:
string
,
scheme
:
string
,
domain
:
string
,
port
:
string
,
path
:
string
,
queryString
:
string
,
fragmentId
:
string
):
void
{
// check for equivalent behaviour
const
uri
=
URI
.
parse
(
raw
);
assert
.
equal
(
uri
.
scheme
,
scheme
);
assert
.
equal
(
uri
.
authority
,
port
?
domain
+
'
:
'
+
port
:
domain
);
assert
.
equal
(
uri
.
path
,
path
);
assert
.
equal
(
uri
.
query
,
queryString
);
assert
.
equal
(
uri
.
fragment
,
fragmentId
);
}
suite
(
'
Network
'
,
()
=>
{
test
(
'
urls
'
,
()
=>
{
assertUrl
(
'
http://www.test.com:8000/this/that/theother.html?query=foo#hash
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
'
hash
'
);
assertUrl
(
'
http://www.test.com:8000/this/that/theother.html?query=foo
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
''
);
assertUrl
(
'
http://www.test.com:8000/this/that/theother.html#hash
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
''
,
'
hash
'
);
assertUrl
(
'
http://www.test.com:8000/#hash
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/
'
,
''
,
'
hash
'
);
assertUrl
(
'
http://www.test.com:8000#hash
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/
'
,
''
,
'
hash
'
);
assertUrl
(
'
http://www.test.com/#hash
'
,
'
http
'
,
'
www.test.com
'
,
''
,
'
/
'
,
''
,
'
hash
'
);
assertUrl
(
'
http://www.test.com#hash
'
,
'
http
'
,
'
www.test.com
'
,
''
,
'
/
'
,
''
,
'
hash
'
);
assertUrl
(
'
http://www.test.com:8000/this/that/theother.html
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
''
,
''
);
assertUrl
(
'
http://www.test.com:8000/
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/
'
,
''
,
''
);
assertUrl
(
'
http://www.test.com:8000
'
,
'
http
'
,
'
www.test.com
'
,
'
8000
'
,
'
/
'
,
''
,
''
);
assertUrl
(
'
http://www.test.com/
'
,
'
http
'
,
'
www.test.com
'
,
''
,
'
/
'
,
''
,
''
);
assertUrl
(
'
//www.test.com/
'
,
''
,
'
www.test.com
'
,
''
,
'
/
'
,
''
,
''
);
assertUrl
(
'
//www.test.com:8000/this/that/theother.html?query=foo#hash
'
,
''
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
'
hash
'
);
assertUrl
(
'
//www.test.com/this/that/theother.html?query=foo#hash
'
,
''
,
'
www.test.com
'
,
''
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
'
hash
'
);
assertUrl
(
'
https://www.test.com:8000/this/that/theother.html?query=foo#hash
'
,
'
https
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
'
hash
'
);
assertUrl
(
'
f12://www.test.com:8000/this/that/theother.html?query=foo#hash
'
,
'
f12
'
,
'
www.test.com
'
,
'
8000
'
,
'
/this/that/theother.html
'
,
'
query=foo
'
,
'
hash
'
);
assertUrl
(
'
inmemory://model/0
'
,
'
inmemory
'
,
'
model
'
,
''
,
'
/0
'
,
''
,
''
);
assertUrl
(
'
file:///c/far/boo/file.cs
'
,
'
file
'
,
''
,
''
,
'
/c/far/boo/file.cs
'
,
''
,
''
);
});
});
src/vs/base/test/common/uri.test.ts
浏览文件 @
e9ed5e19
...
@@ -65,8 +65,6 @@ suite('URI', () => {
...
@@ -65,8 +65,6 @@ suite('URI', () => {
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
www.MSFT.com
'
,
path
:
'
/my/path
'
}).
toString
(),
'
http://www.msft.com/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
www.MSFT.com
'
,
path
:
'
/my/path
'
}).
toString
(),
'
http://www.msft.com/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
my/path
'
}).
toString
(),
'
http:/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
my/path
'
}).
toString
(),
'
http:/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
/my/path
'
}).
toString
(),
'
http:/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
/my/path
'
}).
toString
(),
'
http:/my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
''
,
authority
:
''
,
path
:
'
my/path
'
}).
toString
(),
'
my/path
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
''
,
authority
:
''
,
path
:
'
/my/path
'
}).
toString
(),
'
/my/path
'
);
//http://a-test-site.com/#test=true
//http://a-test-site.com/#test=true
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
'
test=true
'
}).
toString
(),
'
http://a-test-site.com/?test%3Dtrue
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
'
test=true
'
}).
toString
(),
'
http://a-test-site.com/?test%3Dtrue
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
''
,
fragment
:
'
test=true
'
}).
toString
(),
'
http://a-test-site.com/#test%3Dtrue
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
''
,
fragment
:
'
test=true
'
}).
toString
(),
'
http://a-test-site.com/#test%3Dtrue
'
);
...
@@ -75,7 +73,7 @@ suite('URI', () => {
...
@@ -75,7 +73,7 @@ suite('URI', () => {
test
(
'
http#toString, encode=FALSE
'
,
()
=>
{
test
(
'
http#toString, encode=FALSE
'
,
()
=>
{
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
'
test=true
'
}).
toString
(
true
),
'
http://a-test-site.com/?test=true
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
'
test=true
'
}).
toString
(
true
),
'
http://a-test-site.com/?test=true
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
''
,
fragment
:
'
test=true
'
}).
toString
(
true
),
'
http://a-test-site.com/#test=true
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
authority
:
'
a-test-site.com
'
,
path
:
'
/
'
,
query
:
''
,
fragment
:
'
test=true
'
}).
toString
(
true
),
'
http://a-test-site.com/#test=true
'
);
assert
.
equal
(
URI
.
from
({
}).
with
({
scheme
:
'
http
'
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
}).
toString
(
true
),
'
http:/api/files/test.me?t=1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
http
'
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
}).
toString
(
true
),
'
http:/api/files/test.me?t=1234
'
);
var
value
=
URI
.
parse
(
'
file://shares/pröjects/c%23/#l12
'
);
var
value
=
URI
.
parse
(
'
file://shares/pröjects/c%23/#l12
'
);
assert
.
equal
(
value
.
authority
,
'
shares
'
);
assert
.
equal
(
value
.
authority
,
'
shares
'
);
...
@@ -107,12 +105,12 @@ suite('URI', () => {
...
@@ -107,12 +105,12 @@ suite('URI', () => {
test
(
'
with, changes
'
,
()
=>
{
test
(
'
with, changes
'
,
()
=>
{
assert
.
equal
(
URI
.
parse
(
'
before:some/file/path
'
).
with
({
scheme
:
'
after
'
}).
toString
(),
'
after:some/file/path
'
);
assert
.
equal
(
URI
.
parse
(
'
before:some/file/path
'
).
with
({
scheme
:
'
after
'
}).
toString
(),
'
after:some/file/path
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
http
'
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
}).
toString
(),
'
http:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
http
'
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
}).
toString
(),
'
http:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
http:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
http
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
http:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
https
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
https:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
https
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
https:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
HTTP
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
HTTP:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
HTTP
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
HTTP:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
HTTPS
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
HTTPS:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
HTTPS
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
HTTPS:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({}).
with
({
scheme
:
'
boo
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
boo:/api/files/test.me?t%3D1234
'
);
assert
.
equal
(
URI
.
from
({
scheme
:
'
s
'
}).
with
({
scheme
:
'
boo
'
,
authority
:
''
,
path
:
'
/api/files/test.me
'
,
query
:
'
t=1234
'
,
fragment
:
''
}).
toString
(),
'
boo:/api/files/test.me?t%3D1234
'
);
});
});
test
(
'
with, remove components #8465
'
,
()
=>
{
test
(
'
with, remove components #8465
'
,
()
=>
{
...
@@ -186,34 +184,13 @@ suite('URI', () => {
...
@@ -186,34 +184,13 @@ suite('URI', () => {
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
api/files/test
'
);
value
=
URI
.
parse
(
'
foo:
api/files/test
'
);
assert
.
equal
(
value
.
scheme
,
''
);
assert
.
equal
(
value
.
scheme
,
'
foo
'
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
path
,
'
api/files/test
'
);
assert
.
equal
(
value
.
path
,
'
api/files/test
'
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
api
'
);
assert
.
equal
(
value
.
scheme
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
path
,
'
api
'
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
/api/files/test
'
);
assert
.
equal
(
value
.
scheme
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
path
,
'
/api/files/test
'
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
?test
'
);
assert
.
equal
(
value
.
scheme
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
path
,
''
);
assert
.
equal
(
value
.
query
,
'
test
'
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
file:?q
'
);
value
=
URI
.
parse
(
'
file:?q
'
);
assert
.
equal
(
value
.
scheme
,
'
file
'
);
assert
.
equal
(
value
.
scheme
,
'
file
'
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
...
@@ -221,13 +198,6 @@ suite('URI', () => {
...
@@ -221,13 +198,6 @@ suite('URI', () => {
assert
.
equal
(
value
.
query
,
'
q
'
);
assert
.
equal
(
value
.
query
,
'
q
'
);
assert
.
equal
(
value
.
fragment
,
''
);
assert
.
equal
(
value
.
fragment
,
''
);
value
=
URI
.
parse
(
'
#test
'
);
assert
.
equal
(
value
.
scheme
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
path
,
''
);
assert
.
equal
(
value
.
query
,
''
);
assert
.
equal
(
value
.
fragment
,
'
test
'
);
value
=
URI
.
parse
(
'
file:#d
'
);
value
=
URI
.
parse
(
'
file:#d
'
);
assert
.
equal
(
value
.
scheme
,
'
file
'
);
assert
.
equal
(
value
.
scheme
,
'
file
'
);
assert
.
equal
(
value
.
authority
,
''
);
assert
.
equal
(
value
.
authority
,
''
);
...
...
src/vs/platform/markers/test/common/markerService.test.ts
浏览文件 @
e9ed5e19
...
@@ -58,16 +58,16 @@ suite('Marker Service', () => {
...
@@ -58,16 +58,16 @@ suite('Marker Service', () => {
test
(
'
changeOne override
'
,
()
=>
{
test
(
'
changeOne override
'
,
()
=>
{
let
service
=
new
markerService
.
MarkerService
();
let
service
=
new
markerService
.
MarkerService
();
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[
randomMarkerData
()]);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[
randomMarkerData
()]);
assert
.
equal
(
service
.
read
().
length
,
1
);
assert
.
equal
(
service
.
read
().
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
service
.
changeOne
(
'
boo
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[
randomMarkerData
()]);
service
.
changeOne
(
'
boo
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[
randomMarkerData
()]);
assert
.
equal
(
service
.
read
().
length
,
2
);
assert
.
equal
(
service
.
read
().
length
,
2
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[
randomMarkerData
(),
randomMarkerData
()]);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[
randomMarkerData
(),
randomMarkerData
()]);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
2
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
2
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
...
@@ -76,13 +76,13 @@ suite('Marker Service', () => {
...
@@ -76,13 +76,13 @@ suite('Marker Service', () => {
test
(
'
changeOne/All clears
'
,
()
=>
{
test
(
'
changeOne/All clears
'
,
()
=>
{
let
service
=
new
markerService
.
MarkerService
();
let
service
=
new
markerService
.
MarkerService
();
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[
randomMarkerData
()]);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[
randomMarkerData
()]);
service
.
changeOne
(
'
boo
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[
randomMarkerData
()]);
service
.
changeOne
(
'
boo
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[
randomMarkerData
()]);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
().
length
,
2
);
assert
.
equal
(
service
.
read
().
length
,
2
);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
/path/only.cs
'
),
[]);
service
.
changeOne
(
'
far
'
,
URI
.
parse
(
'
file://
/path/only.cs
'
),
[]);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
0
);
assert
.
equal
(
service
.
read
({
owner
:
'
far
'
}).
length
,
0
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
({
owner
:
'
boo
'
}).
length
,
1
);
assert
.
equal
(
service
.
read
().
length
,
1
);
assert
.
equal
(
service
.
read
().
length
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录