FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/test/tests/status_file.js at master · jBox/nodegit · GitHub
jBox
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
test
/
tests
/
status_file.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
85 lines (68 loc) · 2.36 KB
Breadcrumbs
nodegit
/
test
/
tests
/
status_file.js
Copy path
File metadata and controls
85 lines (68 loc) · 2.36 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
var
assert
=
require
(
"assert"
)
;
describe
(
"StatusFile"
,
function
(
)
{
var
NodeGit
=
require
(
"../../"
)
;
var
Status
=
NodeGit
.
Status
;
var
StatusFile
=
NodeGit
.
StatusFile
;
var
pathName
=
"README.md"
;
function
testStatusFile
(
status
)
{
var
statusFile
=
new
StatusFile
(
{
path
:
pathName
,
status
:
Status
.
STATUS
[
status
]
}
)
;
var
specialFunction
=
status
.
replace
(
/
^
(
W
T
|
I
N
D
E
X
)
_
/
,
""
)
;
specialFunction
=
"is"
+
specialFunction
[
0
]
+
specialFunction
.
substring
(
1
)
.
toLowerCase
(
)
;
if
(
/
^
W
T
_
/
.
test
(
status
)
)
{
assert
.
ok
(
statusFile
.
inWorkingTree
(
)
)
;
assert
.
ok
(
!
statusFile
.
inIndex
(
)
)
;
}
if
(
/
^
I
N
D
E
X
_
/
.
test
(
status
)
)
{
assert
.
ok
(
!
statusFile
.
inWorkingTree
(
)
)
;
assert
.
ok
(
statusFile
.
inIndex
(
)
)
;
}
assert
.
equal
(
statusFile
.
path
(
)
,
pathName
)
;
assert
.
equal
(
statusFile
.
statusBit
(
)
,
Status
.
STATUS
[
status
]
)
;
assert
.
equal
(
statusFile
.
status
(
)
,
status
)
;
assert
.
ok
(
statusFile
[
specialFunction
]
(
)
)
;
}
it
.
skip
(
"identifies the proper statuses for CURRENT"
,
function
(
)
{
testStatusFile
(
"CURRENT"
)
;
}
)
;
it
.
skip
(
"identifies the proper statuses for WT_UNREADABLE"
,
function
(
)
{
testStatusFile
(
"WT_UNREADABLE"
)
;
}
)
;
it
(
"identifies the proper statuses for WT_NEW"
,
function
(
)
{
testStatusFile
(
"WT_NEW"
)
;
}
)
;
it
(
"identifies the proper statuses for WT_MODIFIED"
,
function
(
)
{
testStatusFile
(
"WT_MODIFIED"
)
;
}
)
;
it
(
"identifies the proper statuses for WT_DELETED"
,
function
(
)
{
testStatusFile
(
"WT_DELETED"
)
;
}
)
;
it
(
"identifies the proper statuses for WT_TYPECHANGE"
,
function
(
)
{
testStatusFile
(
"WT_TYPECHANGE"
)
;
}
)
;
it
(
"identifies the proper statuses for WT_RENAMED"
,
function
(
)
{
testStatusFile
(
"WT_RENAMED"
)
;
}
)
;
it
(
"identifies the proper statuses for IGNORED"
,
function
(
)
{
testStatusFile
(
"IGNORED"
)
;
}
)
;
it
(
"identifies the proper statuses for INDEX_NEW"
,
function
(
)
{
testStatusFile
(
"INDEX_NEW"
)
;
}
)
;
it
(
"identifies the proper statuses for INDEX_MODIFIED"
,
function
(
)
{
testStatusFile
(
"INDEX_MODIFIED"
)
;
}
)
;
it
(
"identifies the proper statuses for INDEX_DELETED"
,
function
(
)
{
testStatusFile
(
"INDEX_DELETED"
)
;
}
)
;
it
(
"identifies the proper statuses for INDEX_TYPECHANGE"
,
function
(
)
{
testStatusFile
(
"INDEX_TYPECHANGE"
)
;
}
)
;
it
(
"identifies the proper statuses for INDEX_RENAMED"
,
function
(
)
{
testStatusFile
(
"INDEX_RENAMED"
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL