This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,18 @@ describe('when a buffer is already open', () => {
1313 expect ( buffer . getText ( ) ) . toBe ( 'bar(x)' )
1414 } )
1515
16- describe ( 'should properly replace regex literals' , ( ) => {
17- it ( 'replaces tstat_fvars()->curr_setpoint[HEAT_EN] = new_tptr->heat_limit; with tstat_set_curr_setpoint(HEAT_EN, new_tptr->heat_limit );' , ( ) => {
16+ describe ( 'Texts should be replaced properly with strings containing literals when using the regex option ' , ( ) => {
17+ it ( 'replaces tstat_fvars()->curr_setpoint[HEAT_EN] with tstat_set_curr_setpoint($1, $2 );' , ( ) => {
1818 buffer . setPath ( filePath )
1919 buffer . setText ( 'tstat_fvars()->curr_setpoint[HEAT_EN] = new_tptr->heat_limit;' )
2020 buffer . replace ( / t s t a t _ f v a r s \( \) - > c u r r _ s e t p o i n t \[ ( .+ ?) \] = ( .+ ?) ; / , 'tstat_set_curr_setpoint($1, $2);' )
2121
2222 expect ( buffer . getText ( ) ) . toBe ( 'tstat_set_curr_setpoint(HEAT_EN, new_tptr->heat_limit);' )
2323 } )
2424
25- it ( 'replaces atom/flight-manual.atom.io with atom/flight-manualatomio ' , ( ) => {
26- buffer . setText ( 'atom/flight-manual.atom.io ' )
27- buffer . replace ( / \. ( a t o m ) \. / , '$1' )
25+ it ( 'replaces atom/flight-manualatomio with $1 ' , ( ) => {
26+ buffer . setText ( 'atom/flight-manualatomio ' )
27+ buffer . replace ( $1 , '$1' )
2828
2929 expect ( buffer . getText ( ) ) . toBe ( 'atom/flight-manualatomio' )
3030 } )
You can’t perform that action at this time.
0 commit comments