Closed Olipro closed 1 year ago
Hey so Greybel should actually already return intrinsics for shell, file, computer etc. Here a working example with shell: https://editor.greyscript.org/?c=cHJpbnQoJTQwZ2V0X3NoZWxsLl9faXNhKQ%3D%3D
Unless there is a bug or maybe I misunderstood the question?
Hm, so it does. Alright, must be something on my end because MiniMock wasn't picking them up. Closing this up.
Depending on how you want to look at it, this is either a feature request, or a (minor) bug report:
In GreyHack, returned intrinsics such as
computer
,file
,shell
are allmap
objects which have an__isa
pointing to a base that contains all their core functions (e.g.touch
,get_folders
orlaunch
, respectively)In GreyHack, this allows MiniMock to automatically generate mock functions by being passed an instance of any GreyHack intrinsic. In Greybel, this doesn't exist so functions must be manually defined.
In any case, not a significant one, but I figured you'd want to know about it for consistency purposes - and who knows, this might end up also becoming relevant for MiniMicro intrinsics :)