FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit.nodegit/test/tests/attr.js at master · javascript-forks/nodegit.nodegit · GitHub
javascript-forks
nodegit.nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit.nodegit
/
test
/
tests
/
attr.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (28 loc) · 928 Bytes
Breadcrumbs
nodegit.nodegit
/
test
/
tests
/
attr.js
Copy path
File metadata and controls
36 lines (28 loc) · 928 Bytes
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
var
assert
=
require
(
"assert"
)
;
var
path
=
require
(
"path"
)
;
var
local
=
path
.
join
.
bind
(
path
,
__dirname
)
;
describe
(
"Attr"
,
function
(
)
{
var
NodeGit
=
require
(
"../../"
)
;
var
Repository
=
NodeGit
.
Repository
;
var
Attr
=
NodeGit
.
Attr
;
var
Status
=
NodeGit
.
Status
;
var
reposPath
=
local
(
"../repos/workdir"
)
;
beforeEach
(
function
(
)
{
var
test
=
this
;
return
Repository
.
open
(
reposPath
)
.
then
(
function
(
repository
)
{
test
.
repository
=
repository
;
}
)
;
}
)
;
it
(
"can add a macro definition"
,
function
(
)
{
var
error
=
Attr
.
addMacro
(
this
.
repository
,
"binary"
,
"-diff -crlf"
)
;
assert
.
equal
(
error
,
0
)
;
}
)
;
it
(
"can flush the attr cache"
,
function
(
)
{
Attr
.
cacheFlush
(
this
.
repository
)
;
}
)
;
it
(
"can lookup the value of a git attribute"
,
function
(
)
{
var
flags
=
Status
.
SHOW
.
INDEX_AND_WORKDIR
;
return
Attr
.
get
(
this
.
repository
,
flags
,
".gitattributes"
,
"test"
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL