You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Mike Drob <ma...@cloudera.com> on 2015/08/21 16:12:01 UTC

Ant/JUnit/Bash bug with RTL languages?

Hello,

I noticed that when running tests, if the language selected is RTL then the
"JUnit says hello" output is backwards. However, if I copy the output and
try to paste it into firefox or gedit then the text is properly
right-to-left.

For example, when selecting hebrew, on my system it prints
"<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on the
right.

This shouldn't be a high priority, since the tests themselves still pass,
but I was wondering if that's something that we can fix or if the error is
in a lower level - like the junit libs, or maybe even bash. Anybody have
any ideas?

Mike

Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Benson Margulies <bi...@gmail.com>.
On Fri, Aug 21, 2015 at 10:18 AM, Mike Drob <ma...@cloudera.com> wrote:
> Yea, I'm fully ready to hear that it's an issue with bash. Didn't mean to
> cast any aspersions on the test framework, mostly was curious if anybody had
> ever thought about this before.

Not bash, X windows or whatever implements your actual UI output :-)

>
> On Fri, Aug 21, 2015 at 9:13 AM, Benson Margulies <bi...@gmail.com>
> wrote:
>>
>> Isn't this all about how your console does the Unicode bidi algo, and
>> not about anything in the code?
>>
>>
>> On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com> wrote:
>> > Hello,
>> >
>> > I noticed that when running tests, if the language selected is RTL then
>> > the
>> > "JUnit says hello" output is backwards. However, if I copy the output
>> > and
>> > try to paste it into firefox or gedit then the text is properly
>> > right-to-left.
>> >
>> > For example, when selecting hebrew, on my system it prints
>> > "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on
>> > the
>> > right.
>> >
>> > This shouldn't be a high priority, since the tests themselves still
>> > pass,
>> > but I was wondering if that's something that we can fix or if the error
>> > is
>> > in a lower level - like the junit libs, or maybe even bash. Anybody have
>> > any
>> > ideas?
>> >
>> > Mike
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Mike Drob <ma...@cloudera.com>.
Yea, I'm fully ready to hear that it's an issue with bash. Didn't mean to
cast any aspersions on the test framework, mostly was curious if anybody
had ever thought about this before.

On Fri, Aug 21, 2015 at 9:13 AM, Benson Margulies <bi...@gmail.com>
wrote:

> Isn't this all about how your console does the Unicode bidi algo, and
> not about anything in the code?
>
>
> On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com> wrote:
> > Hello,
> >
> > I noticed that when running tests, if the language selected is RTL then
> the
> > "JUnit says hello" output is backwards. However, if I copy the output and
> > try to paste it into firefox or gedit then the text is properly
> > right-to-left.
> >
> > For example, when selecting hebrew, on my system it prints
> > "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on
> the
> > right.
> >
> > This shouldn't be a high priority, since the tests themselves still pass,
> > but I was wondering if that's something that we can fix or if the error
> is
> > in a lower level - like the junit libs, or maybe even bash. Anybody have
> any
> > ideas?
> >
> > Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

RE: Ant/JUnit/Bash bug with RTL languages?

Posted by Uwe Schindler <uw...@thetaphi.de>.
It's a console issue. E.g. if you look on the logs with your internet browser on Jenkins' console log, at least my browser (Google Chrome) selects the RTL parts correctly, just try it.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Robert Muir [mailto:rcmuir@gmail.com]
> Sent: Friday, August 21, 2015 4:22 PM
> To: dev@lucene.apache.org
> Subject: Re: Ant/JUnit/Bash bug with RTL languages?
> 
> Yes exactly, Benson is correct. Look at an arabic text file with "cat"
> on your same console and see if its correct: usually its not.
> 
> On Fri, Aug 21, 2015 at 10:13 AM, Benson Margulies
> <bi...@gmail.com> wrote:
> > Isn't this all about how your console does the Unicode bidi algo, and
> > not about anything in the code?
> >
> >
> > On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com>
> wrote:
> >> Hello,
> >>
> >> I noticed that when running tests, if the language selected is RTL
> >> then the "JUnit says hello" output is backwards. However, if I copy
> >> the output and try to paste it into firefox or gedit then the text is
> >> properly right-to-left.
> >>
> >> For example, when selecting hebrew, on my system it prints "<JUnit4>
> >> says [shin-lamed-vav-mem]" instead of starting with [shin] on the
> >> right.
> >>
> >> This shouldn't be a high priority, since the tests themselves still
> >> pass, but I was wondering if that's something that we can fix or if
> >> the error is in a lower level - like the junit libs, or maybe even
> >> bash. Anybody have any ideas?
> >>
> >> Mike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For
> > additional commands, e-mail: dev-help@lucene.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Dawid Weiss <da...@gmail.com>.
> Oh, those welcome messages don't correlate to the random locale used for
> testing? Moving on, then...

No, they don't. They're actually printed from a different (master)
JVM; the locale you pass for tests execution is propagated to forked
JVM(s).

The welcome message is a tiny joke. It is derived and fully
reproducible based on the master seed (so for the same master seed
you'll get exactly the same welcome message). And I thought it'd be a
nice test of the console's support for exotic unicode languages...
maybe it wasn't the best idea.

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Mike Drob <ma...@cloudera.com>.
Oh, those welcome messages don't correlate to the random locale used for
testing? Moving on, then...

Thanks for the info, Dawid, Robert, and Benson.

On Fri, Aug 21, 2015 at 9:44 AM, Dawid Weiss <da...@gmail.com> wrote:

>
> https://github.com/carrotsearch/randomizedtesting/blob/master/junit4-ant/src/main/java/com/carrotsearch/ant/tasks/junit4/JUnit4.java#L137-L159
>
> I think it's correct in the source. Must be an issue with the console.
>
> Dawid
>
>
> On Fri, Aug 21, 2015 at 4:22 PM, Robert Muir <rc...@gmail.com> wrote:
> > Yes exactly, Benson is correct. Look at an arabic text file with "cat"
> > on your same console and see if its correct: usually its not.
> >
> > On Fri, Aug 21, 2015 at 10:13 AM, Benson Margulies
> > <bi...@gmail.com> wrote:
> >> Isn't this all about how your console does the Unicode bidi algo, and
> >> not about anything in the code?
> >>
> >>
> >> On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com>
> wrote:
> >>> Hello,
> >>>
> >>> I noticed that when running tests, if the language selected is RTL
> then the
> >>> "JUnit says hello" output is backwards. However, if I copy the output
> and
> >>> try to paste it into firefox or gedit then the text is properly
> >>> right-to-left.
> >>>
> >>> For example, when selecting hebrew, on my system it prints
> >>> "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin]
> on the
> >>> right.
> >>>
> >>> This shouldn't be a high priority, since the tests themselves still
> pass,
> >>> but I was wondering if that's something that we can fix or if the
> error is
> >>> in a lower level - like the junit libs, or maybe even bash. Anybody
> have any
> >>> ideas?
> >>>
> >>> Mike
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: dev-help@lucene.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Dawid Weiss <da...@gmail.com>.
https://github.com/carrotsearch/randomizedtesting/blob/master/junit4-ant/src/main/java/com/carrotsearch/ant/tasks/junit4/JUnit4.java#L137-L159

I think it's correct in the source. Must be an issue with the console.

Dawid


On Fri, Aug 21, 2015 at 4:22 PM, Robert Muir <rc...@gmail.com> wrote:
> Yes exactly, Benson is correct. Look at an arabic text file with "cat"
> on your same console and see if its correct: usually its not.
>
> On Fri, Aug 21, 2015 at 10:13 AM, Benson Margulies
> <bi...@gmail.com> wrote:
>> Isn't this all about how your console does the Unicode bidi algo, and
>> not about anything in the code?
>>
>>
>> On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com> wrote:
>>> Hello,
>>>
>>> I noticed that when running tests, if the language selected is RTL then the
>>> "JUnit says hello" output is backwards. However, if I copy the output and
>>> try to paste it into firefox or gedit then the text is properly
>>> right-to-left.
>>>
>>> For example, when selecting hebrew, on my system it prints
>>> "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on the
>>> right.
>>>
>>> This shouldn't be a high priority, since the tests themselves still pass,
>>> but I was wondering if that's something that we can fix or if the error is
>>> in a lower level - like the junit libs, or maybe even bash. Anybody have any
>>> ideas?
>>>
>>> Mike
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Robert Muir <rc...@gmail.com>.
Yes exactly, Benson is correct. Look at an arabic text file with "cat"
on your same console and see if its correct: usually its not.

On Fri, Aug 21, 2015 at 10:13 AM, Benson Margulies
<bi...@gmail.com> wrote:
> Isn't this all about how your console does the Unicode bidi algo, and
> not about anything in the code?
>
>
> On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com> wrote:
>> Hello,
>>
>> I noticed that when running tests, if the language selected is RTL then the
>> "JUnit says hello" output is backwards. However, if I copy the output and
>> try to paste it into firefox or gedit then the text is properly
>> right-to-left.
>>
>> For example, when selecting hebrew, on my system it prints
>> "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on the
>> right.
>>
>> This shouldn't be a high priority, since the tests themselves still pass,
>> but I was wondering if that's something that we can fix or if the error is
>> in a lower level - like the junit libs, or maybe even bash. Anybody have any
>> ideas?
>>
>> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Ant/JUnit/Bash bug with RTL languages?

Posted by Benson Margulies <bi...@gmail.com>.
Isn't this all about how your console does the Unicode bidi algo, and
not about anything in the code?


On Fri, Aug 21, 2015 at 10:12 AM, Mike Drob <ma...@cloudera.com> wrote:
> Hello,
>
> I noticed that when running tests, if the language selected is RTL then the
> "JUnit says hello" output is backwards. However, if I copy the output and
> try to paste it into firefox or gedit then the text is properly
> right-to-left.
>
> For example, when selecting hebrew, on my system it prints
> "<JUnit4> says [shin-lamed-vav-mem]" instead of starting with [shin] on the
> right.
>
> This shouldn't be a high priority, since the tests themselves still pass,
> but I was wondering if that's something that we can fix or if the error is
> in a lower level - like the junit libs, or maybe even bash. Anybody have any
> ideas?
>
> Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org