Skip to content

Commit 4191e1c

Browse files
author
Federico Fissore
committed
Windows: ctags outputs paths with double back slashes
Signed-off-by: Federico Fissore <[email protected]>
1 parent 40328a0 commit 4191e1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/arduino.cc/builder/test/ctags_runner_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func TestCTagsRunner(t *testing.T) {
7878
NoError(t, err)
7979
}
8080

81+
sketchLocation = strings.Replace(sketchLocation, "\\", "\\\\", -1)
8182
expectedOutput := "server " + sketchLocation + " /^BridgeServer server;$/;\" kind:variable line:31\n" +
8283
"setup " + sketchLocation + " /^void setup() {$/;\" kind:function line:33 signature:() returntype:void\n" +
8384
"loop " + sketchLocation + " /^void loop() {$/;\" kind:function line:46 signature:() returntype:void\n" +
@@ -127,6 +128,7 @@ func TestCTagsRunnerSketchWithClass(t *testing.T) {
127128
NoError(t, err)
128129
}
129130

131+
sketchLocation = strings.Replace(sketchLocation, "\\", "\\\\", -1)
130132
expectedOutput := "set_values\t" + sketchLocation + "\t/^ void set_values (int,int);$/;\"\tkind:prototype\tline:4\tclass:Rectangle\tsignature:(int,int)\treturntype:void\n" +
131133
"area\t" + sketchLocation + "\t/^ int area() {return width*height;}$/;\"\tkind:function\tline:5\tclass:Rectangle\tsignature:()\treturntype:int\n" +
132134
"set_values\t" + sketchLocation + "\t/^void Rectangle::set_values (int x, int y) {$/;\"\tkind:function\tline:8\tclass:Rectangle\tsignature:(int x, int y)\treturntype:void\n" +
@@ -174,6 +176,7 @@ func TestCTagsRunnerSketchWithTypename(t *testing.T) {
174176
NoError(t, err)
175177
}
176178

179+
sketchLocation = strings.Replace(sketchLocation, "\\", "\\\\", -1)
177180
expectedOutput := "Foo\t" + sketchLocation + "\t/^ struct Foo{$/;\"\tkind:struct\tline:2\n" +
178181
"setup\t" + sketchLocation + "\t/^void setup() {$/;\"\tkind:function\tline:6\tsignature:()\treturntype:void\n" +
179182
"loop\t" + sketchLocation + "\t/^void loop() {}$/;\"\tkind:function\tline:10\tsignature:()\treturntype:void\n" +
@@ -220,6 +223,7 @@ func TestCTagsRunnerSketchWithNamespace(t *testing.T) {
220223
NoError(t, err)
221224
}
222225

226+
sketchLocation = strings.Replace(sketchLocation, "\\", "\\\\", -1)
223227
expectedOutput := "value\t" + sketchLocation + "\t/^\tint value() {$/;\"\tkind:function\tline:2\tnamespace:Test\tsignature:()\treturntype:int\n" +
224228
"setup\t" + sketchLocation + "\t/^void setup() {}$/;\"\tkind:function\tline:7\tsignature:()\treturntype:void\n" +
225229
"loop\t" + sketchLocation + "\t/^void loop() {}$/;\"\tkind:function\tline:8\tsignature:()\treturntype:void\n"

0 commit comments

Comments
 (0)