1 #/** @file 2 # This is a very simple shell script to test how the interpreter parses the parameters. 3 # 4 # Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> 5 # This program and the accompanying materials 6 # are licensed and made available under the terms and conditions of the BSD License 7 # which accompanies this distribution. The full text of the license may be found at 8 # http://opensource.org/licenses/bsd-license.php 9 # 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 13 #**/ 14 echo -on 15 set Var_EFCF356F_228C_47C2_AD0C_3B5DAC9A8CFA ValueOfGuid 16 set Sharp_E8528E46_A008_4221_8DE0_D5AB42A9C580 ^# 17 set Quote_E95DEE8B_E3AA_4155_9ED5_6916394104FC ^" 18 set Var_ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE 19 alias ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE ShellCTestApp 20 21 # 22 # '^' should escape all special characters (including space) 23 # but has no impact to non-special characters 24 # 25 ShellCTestApp ^^ 26 ShellCTestApp ^# 27 ShellCTestApp ^%Var_EFCF356F_228C_47C2_AD0C_3B5DAC9A8CFA% 28 ShellCTestApp ^" 29 ShellCTestApp ^ 1 30 ShellCTestApp ^ 31 ShellCTestApp ^1 32 ShellCTestApp ^^^" 33 ShellCTestApp ^^^ 34 35 # 36 # '#' should be processed before %% replacement, and inside '"' 37 # 38 ShellCTestApp #%Var_EFCF356F_228C_47C2_AD0C_3B5DAC9A8CFA% 39 #ShellCTestApp "#" 40 ShellCTestApp %Sharp_E8528E46_A008_4221_8DE0_D5AB42A9C580% 41 42 # 43 # '%' should be processed before grouping parameters 44 # 45 ShellCTestApp "%Var_EFCF356F_228C_47C2_AD0C_3B5DAC9A8CFA% 2%Quote_E95DEE8B_E3AA_4155_9ED5_6916394104FC% 46 47 # 48 # alias should be processed after %% replacement 49 # 50 %Var_ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE% 51 52 # 53 # '"' should be stripped, space inside '"' should be kept, 54 # 55 ShellCTestApp "p 1" 56 ShellCTestApp "p"1 57 ShellCTestApp "p 1"e"x""" 58 59 set -d Var_EFCF356F_228C_47C2_AD0C_3B5DAC9A8CFA 60 set -d Sharp_E8528E46_A008_4221_8DE0_D5AB42A9C580 61 set -d Quote_E95DEE8B_E3AA_4155_9ED5_6916394104FC 62 set -d Var_ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE 63 alias -d ShellCTestApp_EE6E8BC6_71A6_44A5_BED3_D8F901105CDE 64 echo -off