@@ -310,14 +310,18 @@ def test_transcript(request, capsys, filename, feedback_to_output):
310310
311311@pytest .mark .parametrize ('expected, transformed' , [
312312 ( 'text with no slashes' , 'text\ with\ no\ slashes' ),
313+ # stuff with just one slash
314+ ( 'use 2/3 cup' , 'use\ 2\/3\ cup' ),
315+ ( '/tmp is nice' , '\/tmp\ is\ nice' ),
316+ ( 'slash at end/' , 'slash\ at\ end\/' ),
317+ # regexes
313318 ( 'specials .*' , 'specials\ \.\*' ),
314319 ( '/.*/' , '.*' ),
315- ( 'use 2\/3 cup' , 'use\ 2\/3\ cup' ),
316320 ( 'specials ^ and + /[0-9]+/' , 'specials\ \^\ and\ \+\ [0-9]+' ),
317- ( '/a{6}/ but not a{6} with /.*?/ more' , 'a{6}\ but\ not\ a\{6\}\ with\ .*?\ more' ),
321+ ( '/a{6}/ but not \/ a{6} with /.*?/ more' , 'a{6}\ but\ not\ \/ a\{6\}\ with\ .*?\ more' ),
318322 ( 'not this slash\/ or this one\/' , 'not\ this\ slash\\ /\ or\ this\ one\\ /' ),
319323 ( 'not \/, use /\|?/, not \/' , 'not\ \\ /\,\ use\ \|?\,\ not\ \\ /' ),
320- # inception: we have a slashes in our regex: backslashed on input, bare on output
324+ # inception: slashes in our regex. backslashed on input, bare on output
321325 ( 'not \/, use /\/?/, not \/' , 'not\ \\ /\,\ use\ /?\,\ not\ \\ /' ),
322326 ( 'the /\/?/ more /.*/ stuff' , 'the\ /?\ more\ .*\ stuff' ),
323327 ])
0 commit comments