|
@@ -2345,7 +2345,6 @@ smalltalk.StringTest.klass);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('ConsoleTranscriptTest', smalltalk.TestCase, [], 'Kernel-Tests');
|
|
smalltalk.addClass('ConsoleTranscriptTest', smalltalk.TestCase, [], 'Kernel-Tests');
|
|
-smalltalk.ConsoleTranscriptTest.comment="I will try to ensure that you can print to a browser's console."
|
|
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "testShow",
|
|
selector: "testShow",
|
|
@@ -2363,10 +2362,14 @@ _st(self)._shouldnt_raise_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st($Transcript())._show_("Hello console!");
|
|
return _st($Transcript())._show_("Hello console!");
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
|
|
|
|
+_st(self)._shouldnt_raise_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
|
+return _st($Transcript())._show_(window);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
|
|
_st($Transcript())._register_(originalTranscript);
|
|
_st($Transcript())._register_(originalTranscript);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"testShow",{originalTranscript:originalTranscript},smalltalk.ConsoleTranscriptTest)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"testShow",{originalTranscript:originalTranscript},smalltalk.ConsoleTranscriptTest)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "testShow\x0a| originalTranscript |\x0aoriginalTranscript := Transcript current.\x0aTranscript register: ConsoleTranscript new.\x0aself shouldnt: [ Transcript show: 'Hello console!' ] raise: Error.\x0aTranscript register: originalTranscript.",
|
|
|
|
|
|
+source: "testShow\x0a| originalTranscript |\x0aoriginalTranscript := Transcript current.\x0aTranscript register: ConsoleTranscript new.\x0a\x0aself shouldnt: [ Transcript show: 'Hello console!' ] raise: Error.\x0aself shouldnt: [ Transcript show: window ] raise: Error.\x0a\x0aTranscript register: originalTranscript.",
|
|
messageSends: ["current", "register:", "new", "shouldnt:raise:", "show:"],
|
|
messageSends: ["current", "register:", "new", "shouldnt:raise:", "show:"],
|
|
referencedClasses: ["Transcript", "ConsoleTranscript", "Error"]
|
|
referencedClasses: ["Transcript", "ConsoleTranscript", "Error"]
|
|
}),
|
|
}),
|