Skip to content

Commit 6c04b0a

Browse files
Update test to have slightly different results for non-windows
1 parent 889caa3 commit 6c04b0a

2 files changed

Lines changed: 154 additions & 1 deletion

File tree

apps/client-e2e/src/tests/notebooks/notebooks-verify-implied-print.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { GetExtensionPath, Sleep } from '@idl/shared';
22
import { OpenNotebookInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
33
import expect from 'expect';
44
import { readFileSync } from 'fs';
5+
import { platform } from 'os';
56
import * as vscode from 'vscode';
67

78
import { RunnerFunction } from '../runner.interface';
@@ -15,7 +16,9 @@ export const NotebooksVerifyImpliedPrint: RunnerFunction = async (init) => {
1516
);
1617

1718
const expectedUri = GetExtensionPath(
18-
'idl/test/client-e2e/notebooks/implied-print/implied-print-results.idlnb'
19+
platform() === 'win32'
20+
? 'idl/test/client-e2e/notebooks/implied-print/implied-print-results.idlnb'
21+
: 'idl/test/client-e2e/notebooks/implied-print/implied-print-results-mac.idlnb'
1922
);
2023

2124
// open notebook
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"version": "2.0.0",
3+
"cells": [
4+
{
5+
"type": "code",
6+
"content": [
7+
"1 + 2"
8+
],
9+
"metadata": {},
10+
"outputs": [
11+
{
12+
"items": [
13+
{
14+
"mime": "text/plain",
15+
"content": [
16+
" 3"
17+
]
18+
}
19+
],
20+
"metadata": {
21+
"id": "not-saved"
22+
}
23+
}
24+
]
25+
},
26+
{
27+
"type": "code",
28+
"content": [
29+
"2 + $",
30+
" 3 + $",
31+
" 4"
32+
],
33+
"metadata": {},
34+
"outputs": [
35+
{
36+
"items": [
37+
{
38+
"mime": "text/plain",
39+
"content": [
40+
" 9"
41+
]
42+
}
43+
],
44+
"metadata": {
45+
"id": "not-saved"
46+
}
47+
}
48+
]
49+
},
50+
{
51+
"type": "code",
52+
"content": [
53+
"`2 + $",
54+
" 2 + $`"
55+
],
56+
"metadata": {},
57+
"outputs": [
58+
{
59+
"items": [
60+
{
61+
"mime": "text/plain",
62+
"content": [
63+
"2 + $",
64+
" 2 + $"
65+
]
66+
}
67+
],
68+
"metadata": {
69+
"id": "not-saved"
70+
}
71+
}
72+
]
73+
},
74+
{
75+
"type": "code",
76+
"content": [
77+
"arr = [1, 2, 3, 4]",
78+
"arr"
79+
],
80+
"metadata": {},
81+
"outputs": [
82+
{
83+
"items": [
84+
{
85+
"mime": "text/plain",
86+
"content": [
87+
" 1 2 3 4"
88+
]
89+
}
90+
],
91+
"metadata": {
92+
"id": "not-saved"
93+
}
94+
}
95+
]
96+
},
97+
{
98+
"type": "code",
99+
"content": [
100+
"arr"
101+
],
102+
"metadata": {},
103+
"outputs": [
104+
{
105+
"items": [
106+
{
107+
"mime": "text/plain",
108+
"content": [
109+
" 1 2 3 4"
110+
]
111+
}
112+
],
113+
"metadata": {
114+
"id": "not-saved"
115+
}
116+
}
117+
]
118+
},
119+
{
120+
"type": "code",
121+
"content": [
122+
"pro awesomeFooBar",
123+
" compile_opt idl2",
124+
" print, 'Hello from awesomeFooBar!'",
125+
"end",
126+
"",
127+
"awesomeFooBar",
128+
"",
129+
"arr"
130+
],
131+
"metadata": {},
132+
"outputs": [
133+
{
134+
"items": [
135+
{
136+
"mime": "text/plain",
137+
"content": [
138+
"Hello from awesomeFooBar!",
139+
" 1 2 3 4"
140+
]
141+
}
142+
],
143+
"metadata": {
144+
"id": "not-saved"
145+
}
146+
}
147+
]
148+
}
149+
]
150+
}

0 commit comments

Comments
 (0)