@@ -56,34 +56,39 @@ describe('resolve', function () {
56
56
assert . equal ( actual , unixify ( path . resolve ( '.' ) ) + '/\\!(foo)' ) ;
57
57
} ) ;
58
58
59
- it ( 'should make a glob absolute from a cwd' , function ( ) {
59
+ it ( 'should make a glob absolute from a relative cwd' , function ( ) {
60
60
actual = resolve ( 'a/*.js' , { cwd : 'foo' } ) ;
61
61
assert . equal ( actual , unixify ( path . resolve ( 'foo/a/*.js' ) ) ) ;
62
62
} ) ;
63
63
64
- it ( 'should make a negative glob absolute from a cwd' , function ( ) {
64
+ it ( 'should make a negative glob absolute from a relative cwd' , function ( ) {
65
65
actual = resolve ( '!a/*.js' , { cwd : 'foo' } ) ;
66
66
assert . equal ( actual , '!' + unixify ( path . resolve ( 'foo/a/*.js' ) ) ) ;
67
67
} ) ;
68
68
69
- it ( 'should make a glob absolute from a root path' , function ( ) {
69
+ it ( 'should make a glob absolute from an absolute cwd' , function ( ) {
70
+ actual = resolve ( 'a/*.js' , { cwd : '/foo' } ) ;
71
+ assert . equal ( actual , unixify ( '/foo/a/*.js' ) ) ;
72
+ } ) ;
73
+
74
+ it ( 'should make a glob absolute from a relative root path' , function ( ) {
70
75
actual = resolve ( '/a/*.js' , { root : 'foo' } ) ;
71
76
assert . equal ( actual , unixify ( path . resolve ( 'foo/a/*.js' ) ) ) ;
72
77
} ) ;
73
78
74
79
it ( 'should make a glob absolute from a root slash' , function ( ) {
75
80
actual = resolve ( '/a/*.js' , { root : '/' } ) ;
76
- assert . equal ( actual , unixify ( path . resolve ( '/a/*.js' ) ) ) ;
81
+ assert . equal ( actual , unixify ( '/a/*.js' ) ) ;
77
82
} ) ;
78
83
79
- it ( 'should make a glob absolute from a negative root path' , function ( ) {
84
+ it ( 'should make a glob absolute from a negative relative root path' , function ( ) {
80
85
actual = resolve ( '!/a/*.js' , { root : 'foo' } ) ;
81
86
assert . equal ( actual , '!' + unixify ( path . resolve ( 'foo/a/*.js' ) ) ) ;
82
87
} ) ;
83
88
84
89
it ( 'should make a negative glob absolute from a negative root path' , function ( ) {
85
90
actual = resolve ( '!/a/*.js' , { root : '/' } )
86
- assert . equal ( actual , '!' + unixify ( path . resolve ( '/a/*.js' ) ) ) ;
91
+ assert . equal ( actual , '!' + unixify ( '/a/*.js' ) ) ;
87
92
} ) ;
88
93
} ) ;
89
94
@@ -93,14 +98,14 @@ describe('resolve', function () {
93
98
assert . equal ( actual , unixify ( path . resolve ( 'foo/bar' ) ) + '\\!(baz)' ) ;
94
99
} ) ;
95
100
96
- it ( 'should make a glob absolute from a root path' , function ( ) {
101
+ it ( 'should make a glob absolute from a relative root path' , function ( ) {
97
102
actual = resolve ( '/a/*.js' , { root : 'foo\\bar\\baz' } ) ;
98
103
assert . equal ( actual , unixify ( path . resolve ( 'foo/bar/baz/a/*.js' ) ) ) ;
99
104
} ) ;
100
105
101
106
it ( 'should make a glob absolute from a root slash' , function ( ) {
102
107
actual = resolve ( '/a/*.js' , { root : '\\' } ) ;
103
- assert . equal ( actual , unixify ( path . resolve ( '/a/*.js' ) ) ) ;
108
+ assert . equal ( actual , unixify ( '/a/*.js' ) ) ;
104
109
} ) ;
105
110
} ) ;
106
111
} ) ;
0 commit comments