1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-28 21:14:57 +03:00

Added the first md5-checked story file test case

This commit is contained in:
Graham Nelson 2022-03-05 21:39:52 +00:00
parent 417bb663d7
commit 2bfe1c2621
12 changed files with 60 additions and 37 deletions

View file

@ -1,6 +1,6 @@
# Inform 7
v10.1.0-alpha.1+6U48 'Krypton' (4 March 2022)
v10.1.0-alpha.1+6U49 'Krypton' (5 March 2022)
## About Inform 7

View file

@ -1,3 +1,3 @@
Prerelease: alpha.1
Build Date: 4 March 2022
Build Number: 6U48
Build Date: 5 March 2022
Build Number: 6U49

View file

@ -319,7 +319,7 @@ Glk errors.
<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">FileIO_PutC</span><span class="plain-syntax"> </span><span class="identifier-syntax">extf</span><span class="plain-syntax"> </span><span class="identifier-syntax">char</span><span class="plain-syntax"> </span><span class="identifier-syntax">struc</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">extf</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">1</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">extf</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">NO_EXTERNAL_FILES</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> -1;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">extf</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">1</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">extf</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">NO_EXTERNAL_FILES</span><span class="plain-syntax">))</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FileIO_Error</span><span class="plain-syntax">(</span><span class="identifier-syntax">extf</span><span class="plain-syntax">, </span><span class="string-syntax">"tried to write to a non-file"</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">struc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TableOfExternalFiles</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">extf</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">struc</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">AUXF_STATUS</span><span class="plain-syntax"> ~=</span>

1
inform6/.gitignore vendored
View file

@ -12,5 +12,6 @@ Tests/Test Cases/_Console_Actual/
Tests/Test Errors/_Console_Actual/
Tests/Test Cases/_Story_File_Actual/
Tests/Test Cases/_Transcript_Actual/
Tests/Test Cases/_md5_Actual/
Tangled/inform6

View file

@ -1,2 +1 @@
Inform 6.36 (24th January 2022)
Switch "-_" unknown (try "inform -h2" for the list)

View file

@ -0,0 +1 @@
Inform 6.36 (24th January 2022)

View file

@ -0,0 +1 @@
90866a483312a4359bc00db776e6eed4

View file

@ -0,0 +1,4 @@
Serial "000000";
[ Main;
];

View file

@ -55,14 +55,9 @@
set: $EXECUTE = 0
endif
mkdir: $PATH/_Transcript_Actual
mkdir: $PATH/_Transcript_Ideal
mkdir: $PATH/_Story_File_Actual
mkdir: $PATH/_Console_Actual
set: $I6CONSOLE = $PATH/_Console_Actual/$CASE.txt
set: $A = $PATH/_Transcript_Actual/$CASE.txt
set: $I = $PATH/_Transcript_Ideal/$CASE.txt
set: $AC = $PATH/_Console_Actual/$CASE.txt
set: $IC = $PATH/_Console_Ideal/$CASE.txt
set: $I6SOURCE = $PATH/$CASE.inf
set: $STORYFILE = $PATH/_Story_File_Actual/$CASE.$EXT
@ -72,27 +67,46 @@
if: $TYPE problem
debugger: lldb -f $I6 -- `$I6OPTIONS $I6SOURCE $STORYFILE
fail step: $I6 `$I6OPTIONS $I6SOURCE $STORYFILE >$I6CONSOLE 2>&1
or: 'failed to produce error messages' $I6CONSOLE
show: $I6CONSOLE
fail step: $I6 `$I6OPTIONS $I6SOURCE $STORYFILE >$AC 2>&1
or: 'failed to produce error messages' $AC
show: $AC
exists: $IC
or: 'produced error(s), but no ideal transcript existed'
match problem: $I6CONSOLE $IC
match problem: $AC $IC
or: 'produced the wrong error(s)'
pass: 'passed'
endif
! And then the general case.
debugger: lldb -f $I6 -- `$I6OPTIONS $I6SOURCE $STORYFILE
step: $I6 `$I6OPTIONS $I6SOURCE $STORYFILE >$I6CONSOLE 2>&1
mkdir: $PATH/_Transcript_Actual
mkdir: $PATH/_Transcript_Ideal
mkdir: $PATH/_md5_Actual
show: $I6CONSOLE
set: $AMD5 = $PATH/_md5_Actual/$CASE.txt
set: $IMD5 = $PATH/_md5_Ideal/$CASE.txt
set: $A = $PATH/_Transcript_Actual/$CASE.txt
set: $I = $PATH/_Transcript_Ideal/$CASE.txt
debugger: lldb -f $I6 -- `$I6OPTIONS $I6SOURCE $STORYFILE
step: $I6 `$I6OPTIONS $I6SOURCE $STORYFILE >$AC 2>&1
show: $AC
exists: $IC
or: 'compiled, but no ideal console output existed'
match problem: $I6CONSOLE $IC
match text: $AC $IC
or: 'compiled, but produced the wrong console output'
if: $VM G
step: echo ${glulx:$STORYFILE$} >$AMD5
else
step: echo ${zmachine:$STORYFILE$} >$AMD5
endif
if exists: $IMD5
match text: $AMD5 $IMD5
or: 'compiled, but produced the wrong md5 checksum'
endif
if: $EXECUTE 1
step: $INT `$INTOPTIONS $STORYFILE >$A 2>&1
or: 'compiled, but was unable to run $INTNAME (do you need to make interpreters?)'

View file

@ -9,4 +9,5 @@ Tests/Test Cases/_Console_Actual/
Tests/Test Errors/_Console_Actual/
Tests/Test Cases/_Story_File_Actual/
Tests/Test Cases/_Transcript_Actual/
Tests/Test Cases/_md5_Actual/
Tangled/inform6

View file

@ -1,31 +1,33 @@
100.0% in inform7 run
55.6% in compilation to Inter
40.7% in //Sequence::undertake_queued_tasks//
56.3% in compilation to Inter
40.9% in //Sequence::undertake_queued_tasks//
3.6% in //MajorNodes::pre_pass//
2.5% in //MajorNodes::pass_1//
1.5% in //ImperativeDefinitions::assess_all//
2.6% in //MajorNodes::pass_1//
1.5% in //RTPhrasebook::compile_entries//
1.4% in //ImperativeDefinitions::assess_all//
1.2% in //RTKindConstructors::compile//
0.4% in //MajorNodes::pass_2//
0.4% in //Sequence::undertake_queued_tasks//
0.4% in //World::stage_V//
0.3% in //ImperativeDefinitions::compile_first_block//
0.3% in //Sequence::undertake_queued_tasks//
0.3% in //Sequence::undertake_queued_tasks//
0.2% in //CompletionModule::compile//
0.1% in //CompletionModule::compile//
0.1% in //InferenceSubjects::emit_all//
0.1% in //RTKindConstructors::compile_permissions//
1.5% not specifically accounted for
42.1% in running Inter pipeline
13.6% in step preparation
10.8% in inter step 6/14: make-synoptic-module
0.1% in //Task::make_built_in_kind_constructors//
2.1% not specifically accounted for
41.7% in running Inter pipeline
13.1% in step preparation
10.2% in inter step 6/14: make-synoptic-module
7.7% in inter step 14/14: generate inform6 -> auto.inf
4.3% in inter step 5/14: load-binary-kits
2.7% in inter step 9/14: make-identifiers-unique
0.4% in inter step 12/14: eliminate-redundant-operations
4.2% in inter step 5/14: load-binary-kits
2.8% in inter step 9/14: make-identifiers-unique
0.3% in inter step 12/14: eliminate-redundant-operations
0.3% in inter step 4/14: compile-splats
0.2% in inter step 7/14: shorten-wiring
0.2% in inter step 8/14: detect-indirect-calls
0.3% in inter step 7/14: shorten-wiring
0.1% in inter step 10/14: reconcile-verbs
0.1% in inter step 11/14: eliminate-redundant-labels
1.0% not specifically accounted for
1.8% in supervisor
0.3% not specifically accounted for
0.1% in inter step 8/14: detect-indirect-calls
2.0% not specifically accounted for
1.7% in supervisor
0.2% not specifically accounted for