diff --git a/.travis.yml b/.travis.yml index 604e82c..8bbafad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,15 @@ # Documentation: http://docs.travis-ci.com/user/languages/julia/ language: julia +codecov: true +coveralls: true os: - linux - osx + - windows julia: - 0.6 + - # 1.0 + - 1.3 - nightly notifications: email: false @@ -13,16 +18,21 @@ git: ## uncomment the following lines to allow failures on nightly julia ## (tests will run but not make your overall status red) -#matrix: -# allow_failures: -# - julia: nightly +matrix: + allow_failures: + - julia: nightly # uncomment the following lines to override the default test script #script: + - export JL_PKG=StringLiterals + - julia --color=yes -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.clone(pwd()); Pkg.build(\"${JL_PKG}\"); + else using Pkg; if VERSION >= v\"1.1.0-rc1\"; Pkg.build(verbose=true); else Pkg.build(); end; end" + - julia --check-bounds=yes --color=yes --inline=no -e "if VERSION < v\"0.7.0-DEV.5183\"; Pkg.test(\"${JL_PKG}\", coverage=true); + else using Pkg; Pkg.test(coverage=true); end" # - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi # - julia -e 'p="https://github.com/JuliaString"; s=".jl.git"; l="_Entities"; Pkg.clone("$p/StrTables$s"); t=("LaTeX","Emoji","HTML","Unicode"); for n in t; Pkg.clone("$p/$n$l$s"); end; Pkg.clone("$p/Format$s"); Pkg.clone(pwd()); Pkg.add("LightXML"); Pkg.add("JSON"); for n in t; Pkg.build("$n$l"); end; Pkg.test("StringLiterals"; coverage=true)' after_success: # push coverage results to Coveralls - - julia -e 'cd(Pkg.dir("StringLiterals")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' + #- julia -e 'VERSION >= v"0.7.0-DEV.5183" && using Pkg; cd(Pkg.dir("StringLiterals")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' # push coverage results to Codecov - - julia -e 'cd(Pkg.dir("StringLiterals")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' + #- julia -e 'VERSION >= v"0.7.0-DEV.5183" && using Pkg; cd(Pkg.dir("StringLiterals")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 0000000..65edfd6 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,113 @@ +# This file is machine-generated - editing it directly is not advised + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[BinaryProvider]] +deps = ["Libdl", "SHA"] +git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c" +uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +version = "0.5.8" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[Emoji_Entities]] +deps = ["JSON", "StrTables"] +git-tree-sha1 = "baaf6c8d153c5a12f53c19e8fbd35de720e41331" +uuid = "fd8f23de-bd2f-5c75-921c-0c9ab51355f5" +version = "1.0.0" + +[[Format]] +deps = ["Printf"] +git-tree-sha1 = "2aac5580957478c8e5f0ad2b5ac41983fa2d2fcc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.0.1" + +[[HTML_Entities]] +deps = ["StrTables"] +git-tree-sha1 = "aa19515d6ebe7f91a39cfc1dc6341f38fcac1282" +uuid = "7693890a-d069-55fe-a829-b4a6d304f0ee" +version = "1.0.0" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.0" + +[[LaTeX_Entities]] +deps = ["LightXML", "StrTables"] +git-tree-sha1 = "8cbd80230cfdde937d5e317a47792d1753309f57" +uuid = "9927f19a-46ce-5bdd-a20a-f46a78b61e3d" +version = "1.0.0" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[LightXML]] +deps = ["BinaryProvider", "Libdl"] +git-tree-sha1 = "be855e3c975b89746b09952407c156b5e4a33a1d" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.8.1" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[Parsers]] +deps = ["Dates", "Test"] +git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "0.3.10" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[StrTables]] +deps = ["Dates"] +git-tree-sha1 = "5998faae8c6308acc25c25896562a1e66a3bb038" +uuid = "9700d1a9-a7c8-5760-9816-a99fda30bb8f" +version = "1.0.1" + +[[Test]] +deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[Unicode_Entities]] +deps = ["StrTables"] +git-tree-sha1 = "5534e2af2e18e4a7424975d6a14fb073cc1c07d8" +uuid = "a8aa15d3-c567-5e9f-b6cc-4b0f97f09cf7" +version = "1.0.1" diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..c603df7 --- /dev/null +++ b/Project.toml @@ -0,0 +1,17 @@ +name = "StringLiterals" +uuid = "a2a04ff6-0b4b-5b5a-81f5-329e130e9e99" +version = "1.0.0-DEV" + +[deps] +Emoji_Entities = "fd8f23de-bd2f-5c75-921c-0c9ab51355f5" +Format = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +HTML_Entities = "7693890a-d069-55fe-a829-b4a6d304f0ee" +LaTeX_Entities = "9927f19a-46ce-5bdd-a20a-f46a78b61e3d" +StrTables = "9700d1a9-a7c8-5760-9816-a99fda30bb8f" +Unicode_Entities = "a8aa15d3-c567-5e9f-b6cc-4b0f97f09cf7" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] \ No newline at end of file diff --git a/src/StringLiterals.jl b/src/StringLiterals.jl index a2f52e6..dd6dbb6 100644 --- a/src/StringLiterals.jl +++ b/src/StringLiterals.jl @@ -34,6 +34,12 @@ else outhex(c, p=1) = string(UInt32(c), base=16, pad=p) end +@static if VERSION >= v"1.0.0" + const next = iterate + start(iter) = 1 + done(iter, state) = iterate(iter, state) === nothing +end + """ String macro with more Swift-like syntax, plus support for emojis and LaTeX names """