diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 9808fab07..ec9da5f2c 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -5577,12 +5577,12 @@ inp_modify_exp(char* expr) s++; wl->wl_word = copy(buf); } else { - wl->wl_word = tprintf("{%s}", buf); + wl->wl_word = tprintf("({%s})", buf); } } else { /* {} around all other tokens */ - wl->wl_word = tprintf("{%s}", buf); + wl->wl_word = tprintf("({%s})", buf); } } } else if (isdigit(c) || (c == '.')) { /* allow .5 format too */ diff --git a/tests/regression/misc/bugs-1.cir b/tests/regression/misc/bugs-1.cir index ebea311e6..81ae865a2 100644 --- a/tests/regression/misc/bugs-1.cir +++ b/tests/regression/misc/bugs-1.cir @@ -13,6 +13,14 @@ v1002_aux aux1002 0 DC=3 b1002_t n1002_t 0 V=(-(v(aux1002))) v1002_g n1002_g 0 -3 +.param aux1003=-2 + +b1003_t n1003_t 0 V='aux1003**2' +v1003_g n1003_g 0 4 + +b1004_t n1004_t 0 V='-aux1003**2' +v1004_g n1004_g 0 -4 + * ---------------------------------------- .control @@ -24,7 +32,7 @@ op let total_count = 0 let fail_count = 0 -let tests = 1001 + vector(2) +let tests = 1001 + vector(4) foreach n $&tests set n_test = "n{$n}_t" diff --git a/tests/regression/misc/bugs-1.out b/tests/regression/misc/bugs-1.out index f2cf2dc09..43bf1bf59 100644 --- a/tests/regression/misc/bugs-1.out +++ b/tests/regression/misc/bugs-1.out @@ -5,4 +5,4 @@ Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 -INFO: 0 of 2 tests failed +INFO: 0 of 4 tests failed