Invalid test cases for #GU3 stage

So while adding the tmp files i can see the tester has used the following syntax during setup

[tester::#LE5] [setup] echo -n "grape raspberry." > "/tmp/foo/'f 97'"
[tester::#LE5] [setup] echo -n "raspberry pineapple." > "/tmp/foo/'f  \\67'"
[tester::#LE5] [setup] echo -n "mango grape." > "/tmp/foo/'f \\40\\'"

But dont follow with the same convention in the test why??

[your-program] $ cat "/tmp/foo/'f 97'" "/tmp/foo/'f  \67'" "/tmp/foo/'f \40\'"

should it not be

$ cat "/tmp/foo/'f 97'" "/tmp/foo/'f  \\67'" "/tmp/foo/'f \\40\\'"

Hey @subhroacharjee, both actually resolve to the same filename.

You can try this out in your local shell to confirm:

I can definitely see how this could be confusing at first glance. We’ll look into how to make it clearer.


[EDIT] Another demo:

This is fine if there is a single quote inside of it, but if you check the following case, we have \n in place \n inside the double quotes that is wrong.

Expected

$ cat "/tmp/bar/f\\n68" 
or
$cat "/tmp/bar/f'\n'68" 

but actual is

$ cat "/tmp/bar/f\n68" 

isnt this wrong ?

@subhroacharjee "\\n" and "\n" are actually the same in this context:

Note that they don’t represent a newline here. They are two literal characters: a backslash \ followed by n:

okay got it boss!! Thank you for the clarification

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.