[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find ONE feature... #111
2 changed files with 15 additions and 0 deletions
|
|
@ -97,6 +97,11 @@ func Direction() TextDirection {
|
|||
return DirLTR
|
||||
}
|
||||
|
||||
// CurrentDirection returns the current default text direction.
|
||||
func CurrentDirection() TextDirection {
|
||||
return Direction()
|
||||
}
|
||||
|
||||
// IsRTL returns true if the current language uses right-to-left text.
|
||||
func IsRTL() bool { return Direction() == DirRTL }
|
||||
|
||||
|
|
|
|||
|
|
@ -198,6 +198,16 @@ func TestDirection_Good(t *testing.T) {
|
|||
assert.Equal(t, DirLTR, dir)
|
||||
}
|
||||
|
||||
// --- Package-level CurrentDirection ---
|
||||
|
||||
func TestCurrentDirection_Good(t *testing.T) {
|
||||
svc, err := New()
|
||||
require.NoError(t, err)
|
||||
SetDefault(svc)
|
||||
|
||||
assert.Equal(t, DirLTR, CurrentDirection())
|
||||
}
|
||||
|
||||
// --- Package-level IsRTL ---
|
||||
|
||||
func TestIsRTL_Good(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue