Skip to content

Commit 015a207

Browse files
committed
[Bug 16539][emscripten] Implement "the systemVersion"
Make `the systemVersion` empty on HTML5.
1 parent 0ab4682 commit 015a207

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

docs/dictionary/function/systemVersion.lcdoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Summary: <return|Returns> the version number of the operating system.
1010

1111
Introduced: 1.0
1212

13-
OS: mac,windows,linux,ios,android
13+
OS: mac,windows,linux,ios,android,html5
1414

1515
Platforms: desktop,server,web,mobile
1616

@@ -52,4 +52,6 @@ Android 2.3.1 installed, this property will return 2.3.1.
5252

5353
>*Note:* When running a Mac OS application in the Classic box on an OS X system, the <systemVersion> function returns the version number of the Classic system folder.
5454

55+
On HTML5 the <systemVersion> is empty.
56+
5557
References: string (keyword), function (control_st), environment (function), buildNumber (function), libURLVersion (function), QTVersion (function), return (glossary)

docs/notes/bugfix-16539.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Implement "the systemVersion" in HTML5 standalones.

engine/src/em-system.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ MCEmscriptenSystem::GetCurrentTime()
168168
bool
169169
MCEmscriptenSystem::GetVersion(MCStringRef & r_string)
170170
{
171-
MCEmscriptenNotImplemented();
172-
return false;
171+
return MCStringCopy(kMCEmptyString, r_string);
173172
}
174173

175174
bool

tests/lcs/core/engine/engine.livecodescript

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ end TestSysError
191191

192192

193193
on TestSystemVersion
194-
if the platform is "HTML5" then
195-
TestSkip "systemVersion not empty", "bug 16539"
196-
exit TestSystemVersion
197-
end if
198-
TestAssert "the systemVersion is not empty", the systemVersion is not empty
194+
if the platform is "HTML5" then
195+
TestAssert "the systemVersion is empty", the systemVersion is empty
196+
else
197+
TestAssert "the systemVersion is not empty", the systemVersion is not empty
198+
end if
199199
end TestSystemVersion
200200

201201

0 commit comments

Comments
 (0)