Skip to content

Commit d5cd9fb

Browse files
committed
Фикс тестов
1 parent ecfdb47 commit d5cd9fb

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/OneScript.StandardLibrary/SystemEnvironmentContext.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,18 @@ public class SystemEnvironmentContext : AutoContext<SystemEnvironmentContext>
4949
/// <summary>
5050
/// Версия OneScript, выполняющая данный сценарий
5151
/// </summary>
52-
[ContextProperty("Версия","Version")]
53-
public string Version => Assembly.GetExecutingAssembly().GetName().Version.ToString();
52+
[ContextProperty("Версия", "Version")]
53+
public string Version
54+
{
55+
get
56+
{
57+
var assembly = Assembly.GetExecutingAssembly();
58+
var informationVersion = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
59+
.InformationalVersion ?? assembly.GetName().Version?.ToString() ?? "<unset>";
60+
61+
return informationVersion;
62+
}
63+
}
5464

5565
/// <summary>
5666
/// Тип операционной системы, на которой выполняется сценарий

src/oscript/ShowUsageBehavior.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public override int Execute()
3030
Output.WriteLine(" -encoding=<encoding-name> set output encoding");
3131
Output.WriteLine(" -codestat=<filename> write code statistics");
3232
Output.WriteLine();
33-
Output.WriteLine();
3433
Output.WriteLine("III. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]");
3534
Output.WriteLine(" Runs as CGI application under HTTP-server (Apache/Nginx/IIS/etc...)");
3635

tests/process.os

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@
158158
| -encoding=<encoding-name> set output encoding
159159
| -codestat=<filename> write code statistics
160160
|
161-
|III. Build standalone executable: oscript.exe -make <script_path> <output_exe>
162-
| Builds a standalone executable module based on script specified
163-
|
164-
|IV. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]
161+
|III. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]
165162
| Runs as CGI application under HTTP-server (Apache/Nginx/IIS/etc...)";
166163

167164
Возврат НормализоватьПереводыСтрок(Текст);

0 commit comments

Comments
 (0)