Skip to content

Commit 05d548e

Browse files
Update tests for formatting changes
1 parent f97daa3 commit 05d548e

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

idl/test/client-e2e/notebooks/notebook-to-pro-code/test_notebook_all_cells.pro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; do nothing
22

3+
34
; no output from running this cell
45
;+
56
;-
@@ -9,6 +10,7 @@ pro test1
910
print, 42
1011
end
1112

13+
1214
; if we have a main level, then run it
1315
;+
1416
; :Returns: any
@@ -19,6 +21,7 @@ function foo1
1921
return, 42
2022
end
2123

24+
2225
; main level programs dont need to have an end
2326
;+
2427
; :Returns: any
@@ -29,6 +32,7 @@ function foo2
2932
return, 42
3033
end
3134

35+
3236
; when we have a stop or syntax error, dont stop at it
3337
;+
3438
;-
@@ -37,6 +41,7 @@ pro mypro
3741
stop
3842
end
3943

44+
4045
; dont execute when we have syntax errors 2
4146
;+
4247
;-
@@ -46,6 +51,7 @@ pro syntax_error
4651
a =
4752
end
4853

54+
4955
; main level program
5056
compile_opt idl2
5157

@@ -55,19 +61,23 @@ compile_opt idl2
5561
arr = findgen(42)
5662
help, arr
5763

64+
5865
; we have compile_opt idl2, so we should have a long
5966
a = 15
6067
help, a
6168

69+
6270
; run our procedure from above
6371
test1
6472

73+
6574
; run when we have compile opt and main level end
6675

6776
compile_opt idl2
6877

6978
print, 5
7079

80+
7181
; Some
7282

7383
; Markdown
@@ -76,27 +86,35 @@ print, 5
7686
a = 15
7787
help, a
7888

89+
7990
; we have compile_opt idl2, so we should have a long
8091
a = 15
8192
help, a
8293

94+
8395
; embed graphics
8496
p = plot(/test)
8597

98+
8699
; run cell and dont capture image output (or any output)
87100
!null = 42
88101

102+
89103
; embed more than one graphic
90104
p1 = plot(/test)
91105
p2 = surface(/test)
92106
p3 = barplot(/test)
93107

108+
94109
; run routine with a stop
95110
mypro
96111

112+
97113
; verify we are at the main level (one item in stack trace)
98114
print, n_elements(scope_traceback()), /implied_print
99115

116+
100117
; dont execute when we have syntax errors 1
101118
a =
119+
102120
end

idl/test/client-e2e/notebooks/notebook-to-pro-code/test_notebook_only_code.pro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; do nothing
22

3+
34
; no output from running this cell
45
;+
56
;-
@@ -9,6 +10,7 @@ pro test1
910
print, 42
1011
end
1112

13+
1214
; if we have a main level, then run it
1315
;+
1416
; :Returns: any
@@ -19,6 +21,7 @@ function foo1
1921
return, 42
2022
end
2123

24+
2225
; main level programs dont need to have an end
2326
;+
2427
; :Returns: any
@@ -29,6 +32,7 @@ function foo2
2932
return, 42
3033
end
3134

35+
3236
; when we have a stop or syntax error, dont stop at it
3337
;+
3438
;-
@@ -37,6 +41,7 @@ pro mypro
3741
stop
3842
end
3943

44+
4045
; dont execute when we have syntax errors 2
4146
;+
4247
;-
@@ -46,51 +51,64 @@ pro syntax_error
4651
a =
4752
end
4853

54+
4955
; main level program
5056
compile_opt idl2
5157

5258
; run when we dont have compile opt or main level
5359
arr = findgen(42)
5460
help, arr
5561

62+
5663
; we have compile_opt idl2, so we should have a long
5764
a = 15
5865
help, a
5966

67+
6068
; run our procedure from above
6169
test1
6270

71+
6372
; run when we have compile opt and main level end
6473

6574
compile_opt idl2
6675

6776
print, 5
6877

78+
6979
; we have compile_opt idl2, so we should have a long
7080
a = 15
7181
help, a
7282

83+
7384
; we have compile_opt idl2, so we should have a long
7485
a = 15
7586
help, a
7687

88+
7789
; embed graphics
7890
p = plot(/test)
7991

92+
8093
; run cell and dont capture image output (or any output)
8194
!null = 42
8295

96+
8397
; embed more than one graphic
8498
p1 = plot(/test)
8599
p2 = surface(/test)
86100
p3 = barplot(/test)
87101

102+
88103
; run routine with a stop
89104
mypro
90105

106+
91107
; verify we are at the main level (one item in stack trace)
92108
print, n_elements(scope_traceback()), /implied_print
93109

110+
94111
; dont execute when we have syntax errors 1
95112
a =
113+
96114
end

0 commit comments

Comments
 (0)