Current section
Files
Jump to
Current section
Files
lib/nldoc/test/empty_text.ex
defmodule NLdoc.Test.EmptyText do
@moduledoc """
This module provides a list of strings that are considered empty texts, i.e. they are non-discernable: they are either invisible or look like whitespace.
"""
@empty_texts [
"",
" ",
" ",
nil,
# Newline (LF)
"\n",
# Tab (HT)
"\t",
# Carriage return (CR)
"\r",
# Backspace
"\b",
# Form feed (FF)
"\f",
# Vertical tab (VT)
"\v",
# Next line (NEL)
"\u0085",
# Non-breaking space
"\u00A0",
# Ogham space mark
"\u1680",
# Mongolian vowel separator
"\u180E",
# En quad
"\u2000",
# Em quad
"\u2001",
# En space
"\u2002",
# Em space
"\u2003",
# Three-per-em space
"\u2004",
# Four-per-em space
"\u2005",
# Six-per-em space
"\u2006",
# Figure space
"\u2007",
# Punctuation space
"\u2008",
# Thin space
"\u2009",
# Hair space
"\u200A",
# Zero-width space
"\u200B",
# Zero-width non-joiner
"\u200C",
# Zero-width joiner
"\u200D",
# Line separator
"\u2028",
# Paragraph separator
"\u2029",
# Narrow no-break space
"\u202F",
# Medium mathematical space
"\u205F",
# Word joiner
"\u2060",
# Ideographic space
"\u3000",
# Byte Order Mark (BOM) / Zero-Width Non-Breaking Space
"\uFEFF"
]
@doc """
Forms of empty texts for use in tests.
## Examples
iex> NLdoc.Test.EmptyText.all() |> Enum.member?(" ")
true
"""
def all, do: @empty_texts
end