mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 00:24:22 +03:00
Merge branch 'ganelson:master' into master
This commit is contained in:
commit
a25f4e89ba
|
@ -1,6 +1,6 @@
|
||||||
# Inform 7
|
# Inform 7
|
||||||
|
|
||||||
[Version](notes/versioning.md): 10.2.0-beta+6W97 'Krypton' (5 August 2023)
|
[Version](notes/versioning.md): 10.2.0-beta+6W98 'Krypton' (8 August 2023)
|
||||||
|
|
||||||
## About Inform
|
## About Inform
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Prerelease: beta
|
Prerelease: beta
|
||||||
Build Date: 5 August 2023
|
Build Date: 8 August 2023
|
||||||
Build Number: 6W97
|
Build Number: 6W98
|
||||||
|
|
|
@ -30,6 +30,7 @@ equivalent of unlocking the doors and turning the lights on in the morning.
|
||||||
int silence_is_golden = FALSE;
|
int silence_is_golden = FALSE;
|
||||||
int index_explicitly_set = FALSE, problems_explicitly_set = FALSE;
|
int index_explicitly_set = FALSE, problems_explicitly_set = FALSE;
|
||||||
pathname *diagnostics_path = NULL;
|
pathname *diagnostics_path = NULL;
|
||||||
|
text_stream *log_to_project = NULL;
|
||||||
|
|
||||||
int Main::deputy(int argc, char *argv[]) {
|
int Main::deputy(int argc, char *argv[]) {
|
||||||
@<Start up@>;
|
@<Start up@>;
|
||||||
|
@ -132,6 +133,9 @@ but we won't assume that. Remember, //supervisor// knows best.
|
||||||
for (int i=0; i<argc; i++) LOG(" %s", argv[i]);
|
for (int i=0; i<argc; i++) LOG(" %s", argv[i]);
|
||||||
LOG("\n");
|
LOG("\n");
|
||||||
CommandLine::play_back_log();
|
CommandLine::play_back_log();
|
||||||
|
if (Str::len(log_to_project) > 0)
|
||||||
|
if (Log::set_aspect_from_command_line(log_to_project, FALSE) == FALSE)
|
||||||
|
Problems::fatal("Unknown -log-to-project setting");
|
||||||
}
|
}
|
||||||
if (proj) {
|
if (proj) {
|
||||||
if (Task::problems_enabled()) {
|
if (Task::problems_enabled()) {
|
||||||
|
@ -288,6 +292,7 @@ compiler via Delia scripts in |intest|.
|
||||||
@e CHECK_RESOURCES_CLSW
|
@e CHECK_RESOURCES_CLSW
|
||||||
@e INBUILD_VERBOSE_CLSW
|
@e INBUILD_VERBOSE_CLSW
|
||||||
@e INBUILD_VERBOSITY_CLSW
|
@e INBUILD_VERBOSITY_CLSW
|
||||||
|
@e LOG_TO_PROJECT_CLSW
|
||||||
|
|
||||||
@<Register command-line arguments@> =
|
@<Register command-line arguments@> =
|
||||||
CommandLine::begin_group(INFORM_TESTING_CLSG, I"for testing and debugging inform7");
|
CommandLine::begin_group(INFORM_TESTING_CLSG, I"for testing and debugging inform7");
|
||||||
|
@ -309,6 +314,8 @@ compiler via Delia scripts in |intest|.
|
||||||
L"if no problems occur, write diagnostics files to directory X", FALSE);
|
L"if no problems occur, write diagnostics files to directory X", FALSE);
|
||||||
CommandLine::declare_switch(REQUIRE_PROBLEM_CLSW, L"require-problem", 2,
|
CommandLine::declare_switch(REQUIRE_PROBLEM_CLSW, L"require-problem", 2,
|
||||||
L"return 0 unless exactly this Problem message is generated");
|
L"return 0 unless exactly this Problem message is generated");
|
||||||
|
CommandLine::declare_switch(LOG_TO_PROJECT_CLSW, L"log-to-project", 2,
|
||||||
|
L"like -log X, but writing the debugging log into the project");
|
||||||
CommandLine::declare_switch(TEST_OUTPUT_CLSW, L"test-output", 2,
|
CommandLine::declare_switch(TEST_OUTPUT_CLSW, L"test-output", 2,
|
||||||
L"write output of internal tests to file X");
|
L"write output of internal tests to file X");
|
||||||
CommandLine::declare_boolean_switch(SILENCE_CLSW, L"silence", 1,
|
CommandLine::declare_boolean_switch(SILENCE_CLSW, L"silence", 1,
|
||||||
|
@ -343,6 +350,7 @@ void Main::switch(int id, int val, text_stream *arg, void *state) {
|
||||||
case DIAGNOSTICS_CLSW: diagnostics_path = Pathnames::from_text(arg); break;
|
case DIAGNOSTICS_CLSW: diagnostics_path = Pathnames::from_text(arg); break;
|
||||||
case CHECK_RESOURCES_CLSW: ResourceFinder::set_mode(val); break;
|
case CHECK_RESOURCES_CLSW: ResourceFinder::set_mode(val); break;
|
||||||
case TEST_OUTPUT_CLSW: InternalTests::set_file(Filenames::from_text(arg)); break;
|
case TEST_OUTPUT_CLSW: InternalTests::set_file(Filenames::from_text(arg)); break;
|
||||||
|
case LOG_TO_PROJECT_CLSW: log_to_project = Str::duplicate(arg); break;
|
||||||
case SILENCE_CLSW: silence_is_golden = TRUE; break;
|
case SILENCE_CLSW: silence_is_golden = TRUE; break;
|
||||||
case INBUILD_VERBOSE_CLSW: Supervisor::set_verbosity(1); break;
|
case INBUILD_VERBOSE_CLSW: Supervisor::set_verbosity(1); break;
|
||||||
case INBUILD_VERBOSITY_CLSW: Supervisor::set_verbosity(val); break;
|
case INBUILD_VERBOSITY_CLSW: Supervisor::set_verbosity(val); break;
|
||||||
|
|
|
@ -8,24 +8,53 @@ default: $INTERNAL = inform7/Internal
|
||||||
default: $TESTRELEASEMETADATA = No
|
default: $TESTRELEASEMETADATA = No
|
||||||
default: $SCRIPT =
|
default: $SCRIPT =
|
||||||
default: $LANGUAGE = Inform
|
default: $LANGUAGE = Inform
|
||||||
default: $FOR = Glulx
|
default: $COMPATIBLEWITH = all
|
||||||
|
|
||||||
! (1) Set $FORMAT to the full description of the language we will transpile
|
! (1) Set $FORMAT to the full description of the language we will transpile
|
||||||
! to, and extract the source text for the case, writing it to the given file:
|
! to, and extract the source text for the case, writing it to the given file:
|
||||||
|
|
||||||
|
if compatible: inform6/32 `$COMPATIBLEWITH
|
||||||
|
default: $FOR = Glulx
|
||||||
|
else
|
||||||
|
if compatible: C `$COMPATIBLEWITH
|
||||||
|
default: $FOR = Glulx
|
||||||
|
else
|
||||||
|
default: $FOR = Z-Machine
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
if: $FOR C
|
if: $FOR C
|
||||||
default: $FORMAT = C
|
default: $FORMAT = C
|
||||||
extract: $WORK/Example.inform/Source/story.ni G
|
|
||||||
else
|
else
|
||||||
if: $FOR Glulx
|
if: $FOR Glulx
|
||||||
default: $FORMAT = Inform6/32
|
default: $FORMAT = Inform6/32
|
||||||
extract: $WORK/Example.inform/Source/story.ni G
|
|
||||||
else
|
else
|
||||||
|
if: $FOR Z-Machine
|
||||||
default: $FORMAT = Inform6/16
|
default: $FORMAT = Inform6/16
|
||||||
extract: $WORK/Example.inform/Source/story.ni Z
|
else
|
||||||
|
if format valid: $FORMAT
|
||||||
|
default: $FORMAT = $FOR
|
||||||
|
else
|
||||||
|
set: $ERROR = 'The format $FORMAT is not something I can test'
|
||||||
|
fail: `$ERROR
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
show: source $WORK/Example.inform/Source/story.ni
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if compatible: $FORMAT `$COMPATIBLEWITH
|
||||||
|
else
|
||||||
|
set: $ERROR = 'The test format $FORMAT is not compatible with $COMPATIBLEWITH'
|
||||||
|
fail: `$ERROR
|
||||||
|
endif
|
||||||
|
|
||||||
|
set: $SOURCE = $WORK/Example.inform/Source/story.ni
|
||||||
|
if compatible: $FORMAT Glulx
|
||||||
|
extract: $SOURCE G
|
||||||
|
else
|
||||||
|
extract: $SOURCE Z
|
||||||
|
endif
|
||||||
|
show: source $SOURCE
|
||||||
|
|
||||||
! (2) Almost all tests produce actual textual output, which we put in $A,
|
! (2) Almost all tests produce actual textual output, which we put in $A,
|
||||||
! and ideal or blessed textual output, which is in $I: the test will end up
|
! and ideal or blessed textual output, which is in $I: the test will end up
|
||||||
|
@ -53,6 +82,17 @@ else
|
||||||
set: $I7OPTIONS = `$I7OPTIONS -external $NEST
|
set: $I7OPTIONS = `$I7OPTIONS -external $NEST
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
if showing: log
|
||||||
|
ifdef: $$LOG
|
||||||
|
set: $I7OPTIONS = `$I7OPTIONS -log-to-project $$LOG
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
set: $I7OPTIONS = `$I7OPTIONS -log nothing
|
||||||
|
endif
|
||||||
|
if showing: inter
|
||||||
|
set: $INTER = $WORK/Example.inform/Build/inter.txt
|
||||||
|
set: $I7OPTIONS = `$I7OPTIONS -variable *tout=$INTER
|
||||||
|
endif
|
||||||
if: $LANGUAGE Basic
|
if: $LANGUAGE Basic
|
||||||
set: $I7OPTIONS = -basic `$I7OPTIONS
|
set: $I7OPTIONS = -basic `$I7OPTIONS
|
||||||
endif
|
endif
|
||||||
|
@ -73,6 +113,7 @@ endif
|
||||||
|
|
||||||
set: $I7 = inform7/Tangled/inform7
|
set: $I7 = inform7/Tangled/inform7
|
||||||
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
||||||
|
set: $I7LOG = '$WORK/Example.inform/Build/Debug log.txt'
|
||||||
|
|
||||||
! (6) Clearing any external files used by the test.
|
! (6) Clearing any external files used by the test.
|
||||||
|
|
||||||
|
@ -95,7 +136,13 @@ endif
|
||||||
if: $TYPE problem
|
if: $TYPE problem
|
||||||
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -crash-all
|
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -crash-all
|
||||||
fail step: $I7 `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform >$A 2>&1
|
fail step: $I7 `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform >$A 2>&1
|
||||||
or: 'failed to produce its namesake Problem message' $A
|
ifpass:
|
||||||
|
show: log $I7LOG
|
||||||
|
show: $A
|
||||||
|
show: i7 $A
|
||||||
|
fail: 'failed to produce its namesake Problem message' $A
|
||||||
|
endif
|
||||||
|
show: log $I7LOG
|
||||||
show: $A
|
show: $A
|
||||||
show: i7 $A
|
show: i7 $A
|
||||||
exists: $I
|
exists: $I
|
||||||
|
@ -122,7 +169,13 @@ if: $TESTRELEASEMETADATA Yes
|
||||||
|
|
||||||
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
||||||
step: $I7 `$I7OPTIONS -project $WORK/Example.inform >$I7CONSOLE 2>&1
|
step: $I7 `$I7OPTIONS -project $WORK/Example.inform >$I7CONSOLE 2>&1
|
||||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
iffail:
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
|
fail: 'failed with Problem message(s)' $I7CONSOLE
|
||||||
|
endif
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
|
|
||||||
set: $ABLURB = $WORK/Example.inform/Release.blurb
|
set: $ABLURB = $WORK/Example.inform/Release.blurb
|
||||||
set: $AIFICTION = $WORK/Example.inform/Metadata.iFiction
|
set: $AIFICTION = $WORK/Example.inform/Metadata.iFiction
|
||||||
|
@ -144,10 +197,15 @@ else
|
||||||
if: $TESTCOMPILERINTERNALS Yes
|
if: $TESTCOMPILERINTERNALS Yes
|
||||||
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -test-output $A -crash-all
|
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -test-output $A -crash-all
|
||||||
step: $I7 `$I7OPTIONS -project $WORK/Example.inform -test-output $A >$I7CONSOLE 2>&1
|
step: $I7 `$I7OPTIONS -project $WORK/Example.inform -test-output $A >$I7CONSOLE 2>&1
|
||||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
iffail:
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
|
fail: 'failed with Problem message(s)' $I7CONSOLE
|
||||||
|
endif
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
show: $A
|
show: $A
|
||||||
show: transcript $A
|
show: transcript $A
|
||||||
show: i7 $I7CONSOLE
|
|
||||||
exists: $I
|
exists: $I
|
||||||
or: 'ran without crashing but no ideal results existed'
|
or: 'ran without crashing but no ideal results existed'
|
||||||
match text: $A $I
|
match text: $A $I
|
||||||
|
@ -162,7 +220,13 @@ if: $FOR C
|
||||||
set: $COUT = $$workspace/Actuals/$CASE.c
|
set: $COUT = $$workspace/Actuals/$CASE.c
|
||||||
set: $OFILE = $WORK/Example.inform/Build/$CASE.o
|
set: $OFILE = $WORK/Example.inform/Build/$CASE.o
|
||||||
step: $I7 `$I7OPTIONS $WORK/Example.inform/Source/story.ni -o $COUT >$I7CONSOLE 2>&1
|
step: $I7 `$I7OPTIONS $WORK/Example.inform/Source/story.ni -o $COUT >$I7CONSOLE 2>&1
|
||||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
iffail:
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
|
fail: 'failed with Problem message(s)' $I7CONSOLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
show: log $I7LOG
|
||||||
show: i7 $I7CONSOLE
|
show: i7 $I7CONSOLE
|
||||||
show: c $COUT
|
show: c $COUT
|
||||||
|
|
||||||
|
@ -207,13 +271,21 @@ else
|
||||||
|
|
||||||
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -crash-all
|
debugger: lldb -f $I7 -- `$I7OPTIONS -project $WORK/Example.inform -crash-all
|
||||||
step: $I7 `$I7OPTIONS -project $WORK/Example.inform >$I7CONSOLE 2>&1
|
step: $I7 `$I7OPTIONS -project $WORK/Example.inform >$I7CONSOLE 2>&1
|
||||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
iffail:
|
||||||
|
show: log $I7LOG
|
||||||
show: i7 $I7CONSOLE
|
show: i7 $I7CONSOLE
|
||||||
|
fail: 'failed with Problem message(s)' $I7CONSOLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
set: $I6SOURCE = $WORK/Example.inform/Build/auto.inf
|
||||||
|
|
||||||
|
show: log $I7LOG
|
||||||
|
show: i7 $I7CONSOLE
|
||||||
|
show: inform6 $I6SOURCE
|
||||||
|
show: inter $INTER
|
||||||
|
|
||||||
if: $COMPILEONLY No
|
if: $COMPILEONLY No
|
||||||
set: $I6 = inform6/Tangled/inform6
|
set: $I6 = inform6/Tangled/inform6
|
||||||
set: $I6SOURCE = $WORK/Example.inform/Build/auto.inf
|
|
||||||
|
|
||||||
hash: $I6SOURCE $WORK/Example.inform/Build/checksum.txt
|
hash: $I6SOURCE $WORK/Example.inform/Build/checksum.txt
|
||||||
or: 'passed (matching cached I6 known to work)'
|
or: 'passed (matching cached I6 known to work)'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "Architecture16Kit",
|
"title": "Architecture16Kit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"compatibility": "16-bit",
|
"compatibility": "16-bit",
|
||||||
"kit-details": {
|
"kit-details": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "Architecture32Kit",
|
"title": "Architecture32Kit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"compatibility": "32-bit",
|
"compatibility": "32-bit",
|
||||||
"kit-details": {
|
"kit-details": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "BasicInformKit",
|
"title": "BasicInformKit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"needs": [ {
|
"needs": [ {
|
||||||
"need": {
|
"need": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "CommandParserKit",
|
"title": "CommandParserKit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"needs": [ {
|
"needs": [ {
|
||||||
"need": {
|
"need": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "EnglishLanguageKit",
|
"title": "EnglishLanguageKit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"needs": [ {
|
"needs": [ {
|
||||||
"need": {
|
"need": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"is": {
|
"is": {
|
||||||
"type": "kit",
|
"type": "kit",
|
||||||
"title": "WorldModelKit",
|
"title": "WorldModelKit",
|
||||||
"version": "10.2.0-beta+6W97"
|
"version": "10.2.0-beta+6W98"
|
||||||
},
|
},
|
||||||
"needs": [ {
|
"needs": [ {
|
||||||
"need": {
|
"need": {
|
||||||
|
|
Loading…
Reference in a new issue