Faculty of Information Technology
Software Engineering Group

Opened 5 years ago

Last modified 5 years ago

#191 testing defect

Smalltalk/X batch launcher fails when custom options contain "tricky" characters for batch files

Reported by: Patrik Svestka Owned by:
Priority: major Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description

During my batch file testing I have identified a batch file deficiency. When a user uses one of the following characters in the Smalltalk/X options: ? ; <&|>! "<&|>!" the batch files "consumes" such option. Smalltalk/X is then started without such an option.

I'm trying to solve this issue with the help of the great developers at Stackoverflow:

https://stackoverflow.com/questions/48303106/why-string-with-question-mark-is-not-printed-in-the-for-batch-statement/48326758?noredirect=1#comment83673929_48326758

Attachments (2)

issue_191_patch_1_of_1_reee1257336aa.patch (22.0 KB) - added by Patrik Svestka 5 years ago.
Improving the launcher
smalltalk_fix_1_of_1_rev_f86707f01834_version_1_7_1__Code_cleanup_and_adding_manual_switch_detection_which_was_removed_by_mistake.patch (1.9 KB) - added by Patrik Svestka 5 years ago.
minor launcher fixes

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by Patrik Svestka

I have tried my best to remove the batch file limitation. When using no-logging and no-colors setup, the speedup is considerable.

Most of the tricky characters are now possible to use. Some with limitations.
The characters ? ; ! should be now without any limitations

The characters ? <&|> need to be properly escaped to work. (See the section "known limitations" number 8) in the batch file.)

The below text is an excerpt from the "known limitations" section.

ECHO 8)  Characters ^^^< ^^^& ^^^| ^^^> need to be escaped with triple batch escaping character: ^^^.  
ECHO     Inner, within double or single quotes,  double or single quotes can not be used.
ECHO:
ECHO     Note: Using the multiple tricky characters together within one command can cause the command to fail altogether
ECHO:
ECHO     User input validation is tricky in batch files.  There is no foolproof user validation.
ECHO     You can visit http://www.robvanderwoude.com/battech_inputvalidation_commandline.php for more.
ECHO:

I'm adding a patch here which needs to have the bundle from #188 (Bundle from 1532:211633e7aff2 - issue_188_from_211633e7aff2_to_tip_revision.bundle​) to be applied beforehand in order to work.

Changed 5 years ago by Patrik Svestka

Improving the launcher

comment:2 Changed 5 years ago by Patrik Svestka

Status: newtesting

comment:3 Changed 5 years ago by Patrik Svestka

I have fixed some minor issues, please apply both patches issue_191_patch_1_of_1_reee1257336aa.patch and smalltalk_fix_1_of_1_rev_f86707f01834_version_1_7_1__Code_cleanup_and_adding_manual_switch_detection_which_was_removed_by_mistake to have the latest 1.7.1 version of the launcher.

Note: See TracTickets for help on using tickets.