mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
@@ -12,15 +12,15 @@
|
||||
|
||||
(t/deftest test-valid-token-name-schema
|
||||
;; Allow regular namespace token names
|
||||
(t/is (some? (m/validate wtf/valid-token-name-schema "Foo")))
|
||||
(t/is (some? (m/validate wtf/valid-token-name-schema "foo")))
|
||||
(t/is (some? (m/validate wtf/valid-token-name-schema "FOO")))
|
||||
(t/is (some? (m/validate wtf/valid-token-name-schema "Foo.Bar.Baz")))
|
||||
(t/is (some? (m/validate wtf/well-formed-token-name-schema "Foo")))
|
||||
(t/is (some? (m/validate wtf/well-formed-token-name-schema "foo")))
|
||||
(t/is (some? (m/validate wtf/well-formed-token-name-schema "FOO")))
|
||||
(t/is (some? (m/validate wtf/well-formed-token-name-schema "Foo.Bar.Baz")))
|
||||
;; Allow trailing tokens
|
||||
(t/is (nil? (m/validate wtf/valid-token-name-schema "Foo.Bar.Baz....")))
|
||||
(t/is (nil? (m/validate wtf/well-formed-token-name-schema "Foo.Bar.Baz....")))
|
||||
;; Disallow multiple separator dots
|
||||
(t/is (nil? (m/validate wtf/valid-token-name-schema "Foo..Bar.Baz")))
|
||||
(t/is (nil? (m/validate wtf/well-formed-token-name-schema "Foo..Bar.Baz")))
|
||||
;; Disallow any special characters
|
||||
(t/is (nil? (m/validate wtf/valid-token-name-schema "Hey Foo.Bar")))
|
||||
(t/is (nil? (m/validate wtf/valid-token-name-schema "Hey😈Foo.Bar")))
|
||||
(t/is (nil? (m/validate wtf/valid-token-name-schema "Hey%Foo.Bar"))))
|
||||
(t/is (nil? (m/validate wtf/well-formed-token-name-schema "Hey Foo.Bar")))
|
||||
(t/is (nil? (m/validate wtf/well-formed-token-name-schema "Hey😈Foo.Bar")))
|
||||
(t/is (nil? (m/validate wtf/well-formed-token-name-schema "Hey%Foo.Bar"))))
|
||||
|
||||
Reference in New Issue
Block a user