Skip to content

Commit

Permalink
Fix for Mantis bug 1774
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 14, 2022
1 parent b4a03dc commit dad80cb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
22 changes: 12 additions & 10 deletions inform7/Tests/Test Problems/_Results_Ideal/PM_NameWithBrackets.txt
@@ -1,12 +1,14 @@
Inform 7 build 6L26 has started.
Inform 7 v10.1.0 has started.
I've now read your source text, which is 6 words long.
I've also read Standard Rules by Graham Nelson, which is 42597 words long.
I've also read English Language by Graham Nelson, which is 2288 words long.
I've also read Basic Inform by Graham Nelson, which is 7691 words long.
I've also read English Language by Graham Nelson, which is 2328 words long.
I've also read Standard Rules by Graham Nelson, which is 32132 words long.
Problem__ PM_NameWithBrackets
>--> You wrote 'Ballroom (East Corner) is a room' (source text, line 1): but
this seems to give something a name which contains brackets '(' or ')',
which is not allowed since the potential for confusion with other uses for
brackets in Inform source text is too high. (If you need, say, a room which
the player sees as 'Fillmore (West)', you can get this effect with:
'Fillmore West is a room with printed name "Fillmore (West)".')
Inform 7 has finished: 16 centiseconds used.
>--> The sentence 'Ballroom (East Corner) is a room' (source text, line 1)
seems to give something the name 'Ballroom (East Corner)', but that name
contains brackets '(' or ')', which is not allowed since the potential for
confusion with other uses for brackets in Inform source text is too high.
(If you need, say, a room which the player sees as 'Fillmore (West)', you
can get this effect with: 'Fillmore West is a room with printed name
"Fillmore (West)".')
Inform 7 has finished.
18 changes: 11 additions & 7 deletions inform7/assertions-module/Chapter 4/The Creator.w
Expand Up @@ -414,13 +414,17 @@ it handles crashes correctly.
"a room with printed name \"A\".')");

@<Issue PM_NameWithBrackets problem@> =
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_NameWithBrackets),
"this seems to give something a name which contains brackets '(' or ')'",
"which is not allowed since the potential for confusion with other uses "
"for brackets in Inform source text is too high. (If you need, say, a "
"room which the player sees as 'Fillmore (West)', you can get this "
"effect with: 'Fillmore West is a room with printed name \"Fillmore "
"(West)\".')");
Problems::quote_source(1, current_sentence);
Problems::quote_wording(2, W);
StandardProblems::handmade_problem(Task::syntax_tree(), _p_(PM_NameWithBrackets));
Problems::issue_problem_segment(
"The sentence %1 seems to give something the name '%2', but that name "
"contains brackets '(' or ')', which is not allowed since the potential "
"for confusion with other uses for brackets in Inform source text is too "
"high. (If you need, say, a room which the player sees as 'Fillmore (West)', "
"you can get this effect with: 'Fillmore West is a room with printed name "
"\"Fillmore (West)\".')");
Problems::issue_problem_end();

@<Issue PM_Crash1 problem@> =
WRITE_TO(STDERR, "*** Exit(1) requested for testing purposes ***\n");
Expand Down

0 comments on commit dad80cb

Please sign in to comment.