Closed Bug 304897 Opened 19 years ago Closed 18 years ago

incorrect uneval() when string contains tab (\t)(\x09)

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: simon.place, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050712 Firefox/1.0+ Mnenhy/0.7.2.0
Build Identifier: 

uneval of tab ( \t or \x09 )  returns spaces to the current tab point, in recent
builds, but not older builds.

Reproducible: Always

Steps to Reproduce:
1. print(uneval("\t"))
2.
3.

Actual Results:  
js> build()
built on Jul  9 2005 at 11:33:39
js> print(uneval("\t"))
"       "
js>

__or__

js> build()
built on May 27 2005 at 11:39:01
js> print(uneval("\t"))
"       "
js>

Expected Results:  
js> build()
built on Mar 30 2005 at 16:59:59
js> print(uneval("\t"))
"\t"
js>

__or__

Rhino 1.6 release 1 2004 11 30
js> print(uneval("\t"))
"\t"
js>
works for me in a 1.7 and 1.8 build on winxp.

Checking in regress-304897.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-304897.js,v  <--  regress-304897.js
initial revision: 1.1
done
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Flags: testcase+
Resolution: --- → WORKSFORME
still a prob. here;

build downloaded from here: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/contrib/latest-trunk/firefox-win32-svg-GDI.zip
js> build()
built on Oct 18 2005 at 11:48:03
js> print(uneval("\t"))
"       "
js> 

and also on Deer Park alpha 2:

js> build()
built on Jul  9 2005 at 11:33:39
js> version()
0
js> print(uneval("\t"))
"       "
js>
Ok, I am officially confused.

'"\\t"' == uneval('\t')
firefox 1.0.7 js console: true
firefox 1.0.7 js shell  : true
firefox 1.5 js console  : false
firefox 1.5 js shell    : true
firefox 1.6+ console    : false
firefox 1.6+ js shell   : true

'"\t"' == uneval('\t')
firefox 1.0.7 js console: false
firefox 1.0.7 js shell  : false
firefox 1.5 js console  : true
firefox 1.5 js shell    : false
firefox 1.6+ console    : true
firefox 1.6+ js shell   : false
see below, what you are actually getting are spaces upto the next tab stop,
js> print(uneval("\t"))
"       "
js> print (" "+uneval("\t"))
 "      "
js> print ("   "+uneval("\t"))
   "    "
js> print ("       "+uneval("\t"))
       "        "
js>
(In reply to comment #4)
> see below, what you are actually getting are spaces upto the next tab stop,
> js> print(uneval("\t"))
> "       "
> js> print (" "+uneval("\t"))
>  "      "
> js> print ("   "+uneval("\t"))
>    "    "
> js> print ("       "+uneval("\t"))
>        "        "
> js>
> 
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
FYI, js/tests/js1_5/Regress/regress-304897.js -> js/tests/js1_5/extensions/regress-304897.js. Or so it appears.
I think this is fixed by Bug 383721 
Thanks Biju.
Status: NEW → RESOLVED
Closed: 19 years ago18 years ago
Resolution: --- → FIXED
verified fixed 1.9.0 linux/mac*/windows.
Status: RESOLVED → VERIFIED
Flags: blocking1.9?
You need to log in before you can comment on or make changes to this bug.