saeed199024 / cssjanus

Automatically exported from code.google.com/p/cssjanus
Apache License 2.0
0 stars 0 forks source link

noflip only works on the first flipped property #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With this input,
/* @noflip */
.hello
{
    left: 0px;
    padding-right: 5px;
}

the expected output is, 
/* @noflip */
.hello
{
    left: 0px;
    padding-right: 5px;
}

but I get this output:
/* @noflip */
.hello
{
    left: 0px;
    padding-left: 5px;
}

What version of the product are you using? On what operating system?
re-produced from a fresh checkout and on the website.

Please provide any additional information below.

Original issue reported on code.google.com by johnayna...@gmail.com on 10 Nov 2008 at 9:32

GoogleCodeExporter commented 9 years ago
Sample Unit Tests that fail:

testcase = ['/* @noflip */ div { float: left; text-align: left; } div { float: 
left; }']
shouldbe = ['/* @noflip */ div { float: left; text-align: left;} div { float: 
right; }']
self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))

testcase = ['/* @noflip */ div { float: left; text-align: left; } div { float: 
left; }']
shouldbe = ['/* @noflip */\ndiv { float: left; text-align: left;} div { float: 
right; }']
self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))

Original comment by chad.lit...@gmail.com on 4 Mar 2009 at 7:42

GoogleCodeExporter commented 9 years ago
Look in your shouldbe string, see the missing space after the semicolon after 
left;?
That's why this test fails.
I added another couple unit tests as well that cover this case, and all is good.
Also, I tried the example above from stdin, and things are aok. My hunch is 
another
bugfix may have gotten this one.

Original comment by els...@gmail.com on 1 Jul 2009 at 12:35