Repository navigation
Commit 24bc565
committed
Add unit tests for natural text alignment on iOS
RCTNSTextAttributesFromTextAttributes resolves a paragraph that declares
no textAlign to the start edge of its layout direction, left to right as
well as right to left (#57634, #59249), and leaves it to UIKit when the
text attributes carry no layout direction, as a text input's do.
Cover the three cases. The left-to-right one fails without #59249, where
the paragraph gets no paragraph style at all: a test that read only the
alignment would pass there, since a nil paragraph style reads as
NSTextAlignmentLeft.1 parent 19d6d17 commit 24bc565
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
136 | 161 | | |
137 | 162 | | |
138 | 163 | | |
| |||
0 commit comments