perpetualintelligence / terminal

The most flexible cross-platform framework for building modern and secured terminals.
https://www.perpetualintelligence.com/products/piterminal
Other
37 stars 3 forks source link

Improve the logic of CommandRouteParser for separators #86

Open perpetualintelligencegit opened 1 year ago

perpetualintelligencegit commented 1 year ago

Describe the bug These tests should fail: Value_Separators_In_Between_Are_Ignored Duplicate_Value_Separators_In_Between_Are_Ignored Mixed_Duplicate_Value_Separators_In_Between_Are_Ignored

Our current logic uses separator and valueSeparation to split the command string. This is not an issue if both are the same e.g. " ".

If both values are different (e..g " " and "=") then this has an unexpected consequence. We end up ignoring an invalid command string. root1=grp1=cmd1 --opt3=\"option delimited value3\"

This should be an error as the command and arguments are still required to be separated by " ".