diff options
Diffstat (limited to 'std/encoding/testdata')
m--------- | std | 0 | ||||
-rw-r--r-- | std/encoding/testdata/CRLF.toml | 3 | ||||
-rw-r--r-- | std/encoding/testdata/arrayTable.toml | 12 | ||||
-rw-r--r-- | std/encoding/testdata/arrays.toml | 8 | ||||
-rw-r--r-- | std/encoding/testdata/boolean.toml | 3 | ||||
-rw-r--r-- | std/encoding/testdata/cargo.toml | 56 | ||||
-rw-r--r-- | std/encoding/testdata/cargoTest.toml | 147 | ||||
-rw-r--r-- | std/encoding/testdata/datetime.toml | 8 | ||||
-rw-r--r-- | std/encoding/testdata/float.toml | 23 | ||||
-rw-r--r-- | std/encoding/testdata/inlineTable.toml | 7 | ||||
-rw-r--r-- | std/encoding/testdata/integer.toml | 20 | ||||
-rw-r--r-- | std/encoding/testdata/simple.toml | 5 | ||||
-rw-r--r-- | std/encoding/testdata/string.toml | 30 | ||||
-rw-r--r-- | std/encoding/testdata/table.toml | 13 |
14 files changed, 335 insertions, 0 deletions
diff --git a/std b/std deleted file mode 160000 -Subproject 43aafbf33285753e7b42230f0eb7969b300f71c diff --git a/std/encoding/testdata/CRLF.toml b/std/encoding/testdata/CRLF.toml new file mode 100644 index 000000000..92264888a --- /dev/null +++ b/std/encoding/testdata/CRLF.toml @@ -0,0 +1,3 @@ +[boolean] +bool1 = true +bool2 = false
\ No newline at end of file diff --git a/std/encoding/testdata/arrayTable.toml b/std/encoding/testdata/arrayTable.toml new file mode 100644 index 000000000..3788b7e7c --- /dev/null +++ b/std/encoding/testdata/arrayTable.toml @@ -0,0 +1,12 @@ + +[[bin]] +name = "deno" +path = "cli/main.rs" + +[[bin]] +name = "deno_core" +path = "src/foo.rs" + +[[nib]] +name = "node" +path = "not_found"
\ No newline at end of file diff --git a/std/encoding/testdata/arrays.toml b/std/encoding/testdata/arrays.toml new file mode 100644 index 000000000..5d5913d0c --- /dev/null +++ b/std/encoding/testdata/arrays.toml @@ -0,0 +1,8 @@ +[arrays] +data = [ ["gamma", "delta"], [1, 2] ] + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] diff --git a/std/encoding/testdata/boolean.toml b/std/encoding/testdata/boolean.toml new file mode 100644 index 000000000..242d29c96 --- /dev/null +++ b/std/encoding/testdata/boolean.toml @@ -0,0 +1,3 @@ +[boolean] # i hate comments +bool1 = true +bool2 = false
\ No newline at end of file diff --git a/std/encoding/testdata/cargo.toml b/std/encoding/testdata/cargo.toml new file mode 100644 index 000000000..291aa7db6 --- /dev/null +++ b/std/encoding/testdata/cargo.toml @@ -0,0 +1,56 @@ +# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +# Dummy package info required by `cargo fetch`. +# Use tools/sync_third_party.py to install deps after editing this file. +# Deno does not build with cargo. Deno uses a build system called gn. +# See build_extra/rust/BUILD.gn for the manually built configuration of rust +# crates. + +[workspace] +members = [ + "./", + "core", +] + +[[bin]] +name = "deno" +path = "cli/main.rs" + +[package] +name = "deno" +version = "0.3.4" +edition = "2018" + +[dependencies] +deno_core = { path = "./core" } + +ansi_term = "0.11.0" +atty = "0.2.11" +dirs = "1.0.5" +flatbuffers = "0.5.0" +futures = "0.1.25" +getopts = "0.2.18" +http = "0.1.16" +hyper = "0.12.24" +hyper-rustls = "0.16.0" +integer-atomics = "1.0.2" +lazy_static = "1.3.0" +libc = "0.2.49" +log = "0.4.6" +rand = "0.6.5" +regex = "1.1.0" +remove_dir_all = "0.5.1" +ring = "0.14.6" +rustyline = "3.0.0" +serde_json = "1.0.38" +source-map-mappings = "0.5.0" +tempfile = "3.0.7" +tokio = "0.1.15" +tokio-executor = "0.1.6" +tokio-fs = "0.1.5" +tokio-io = "0.1.11" +tokio-process = "0.2.3" +tokio-threadpool = "0.1.11" +url = "1.7.2" + +[target.'cfg(windows)'.dependencies] +winapi = "0.3.6" diff --git a/std/encoding/testdata/cargoTest.toml b/std/encoding/testdata/cargoTest.toml new file mode 100644 index 000000000..47e7f6e4d --- /dev/null +++ b/std/encoding/testdata/cargoTest.toml @@ -0,0 +1,147 @@ +# This is a TOML document. + +title = "TOML Example" + +[deeply.nested.object.in.the.toml] +name = "Tom Preston-Werner" +dob = 2009-05-27T07:32:00 + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # Indentation (tabs and/or spaces) is allowed but not required + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] + +[strings] +str0 = "deno" +str1 = """ +Roses are red + Violets are blue""" +# On a Unix system, the above multi-line string will most likely be the same as: +str2 = "Roses are red\nViolets are blue" + +# On a Windows system, it will most likely be equivalent to: +str3 = "Roses are red\r\nViolets are blue" +str4 = "The quick brown fox jumps over the lazy dog." +str5 = "this is a \"quote\"" + +str5 = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +str6 = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ +lines = ''' +The first newline is +trimmed in raw strings. + All other whitespace + is preserved. +''' + +[Integer] +int1 = +99 +int2 = 42 +int3 = 0 +int4 = -17 +int5 = 1_000 +int6 = 5_349_221 +int7 = 1_2_3_4_5 # VALID but discouraged + +# hexadecimal with prefix `0x` +hex1 = 0xDEADBEEF +hex2 = 0xdeadbeef +hex3 = 0xdead_beef + +# octal with prefix `0o` +oct1 = 0o01234567 +oct2 = 0o755 # useful for Unix file permissions + +# binary with prefix `0b` +bin1 = 0b11010110 + +[Date-Time] +odt1 = 1979-05-27T07:32:00Z +odt2 = 1979-05-27T00:32:00-07:00 +odt3 = 1979-05-27T00:32:00.999999-07:00 +odt4 = 1979-05-27 07:32:00Z +ld1 = 1979-05-27 +lt1 = 07:32:00 #buggy +lt2 = 00:32:00.999999 #buggy + +[boolean] +bool1 = true +bool2 = false + +[float] +# fractional +flt1 = +1.0 +flt2 = 3.1415 +flt3 = -0.01 + +# exponent +flt4 = 5e+22 +flt5 = 1e6 +flt6 = -2E-2 + +# both +flt7 = 6.626e-34 +flt8 = 224_617.445_991_228 +# infinity +sf1 = inf # positive infinity +sf2 = +inf # positive infinity +sf3 = -inf # negative infinity + +# not a number +sf4 = nan # actual sNaN/qNaN encoding is implementation specific +sf5 = +nan # same as `nan` +sf6 = -nan # valid, actual encoding is implementation specific + +[Table] +name = { first = "Tom", last = "Preston-Werner" } +point = { x = 1, y = 2 } +animal = { type.name = "pug" } + +[[fruit]] + name = "apple" + + [fruit.physical] + color = "red" + shape = "round" + + [[fruit.variety]] + name = "red delicious" + + [[fruit.variety]] + name = "granny smith" + +[[fruit]] + name = "banana" + + [[fruit.variety]] + name = "plantain" diff --git a/std/encoding/testdata/datetime.toml b/std/encoding/testdata/datetime.toml new file mode 100644 index 000000000..62377a4ba --- /dev/null +++ b/std/encoding/testdata/datetime.toml @@ -0,0 +1,8 @@ +[datetime] +odt1 = 1979-05-27T07:32:00Z # Comment +odt2 = 1979-05-27T00:32:00-07:00 # Comment +odt3 = 1979-05-27T00:32:00.999999-07:00 # Comment +odt4 = 1979-05-27 07:32:00Z # Comment +ld1 = 1979-05-27 # Comment +lt1 = 07:32:00 # Comment +lt2 = 00:32:00.999999 # Comment diff --git a/std/encoding/testdata/float.toml b/std/encoding/testdata/float.toml new file mode 100644 index 000000000..6a384179c --- /dev/null +++ b/std/encoding/testdata/float.toml @@ -0,0 +1,23 @@ +[float] +# fractional +flt1 = +1.0 # Comment +flt2 = 3.1415 # Comment +flt3 = -0.01 # Comment + +# exponent +flt4 = 5e+22 # Comment +flt5 = 1e6 # Comment +flt6 = -2E-2 # Comment + +# both +flt7 = 6.626e-34 # Comment +flt8 = 224_617.445_991_228 # Comment +# infinity +sf1 = inf # positive infinity +sf2 = +inf # positive infinity +sf3 = -inf # negative infinity + +# not a number +sf4 = nan # actual sNaN/qNaN encoding is implementation specific +sf5 = +nan # same as `nan` +sf6 = -nan # valid, actual encoding is implementation specific
\ No newline at end of file diff --git a/std/encoding/testdata/inlineTable.toml b/std/encoding/testdata/inlineTable.toml new file mode 100644 index 000000000..203cb16db --- /dev/null +++ b/std/encoding/testdata/inlineTable.toml @@ -0,0 +1,7 @@ +[inlinetable] +name = { first = "Tom", last = "Preston-Werner" } +point = { x = 1, y = 2 } +dog = { type = { name = "pug" } } +animal.as.leaders = "tosin" +"tosin.abasi" = "guitarist" +nile = { derek.roddy = "drummer", also = { malevolant.creation = { drum.kit = "Tama" } } }
\ No newline at end of file diff --git a/std/encoding/testdata/integer.toml b/std/encoding/testdata/integer.toml new file mode 100644 index 000000000..3bd781e8f --- /dev/null +++ b/std/encoding/testdata/integer.toml @@ -0,0 +1,20 @@ +[integer] +int1 = +99 +int2 = 42 +int3 = 0 +int4 = -17 +int5 = 1_000 +int6 = 5_349_221 +int7 = 1_2_3_4_5 # VALID but discouraged + +# hexadecimal with prefix `0x` +hex1 = 0xDEADBEEF +hex2 = 0xdeadbeef +hex3 = 0xdead_beef + +# octal with prefix `0o` +oct1 = 0o01234567 +oct2 = 0o755 # useful for Unix file permissions + +# binary with prefix `0b` +bin1 = 0b11010110
\ No newline at end of file diff --git a/std/encoding/testdata/simple.toml b/std/encoding/testdata/simple.toml new file mode 100644 index 000000000..f3f6c1036 --- /dev/null +++ b/std/encoding/testdata/simple.toml @@ -0,0 +1,5 @@ +deno = "is" +not = "[node]" +regex = '<\i\c*\s*>' +NANI = '何?!' +comment = "Comment inside # the comment" # Comment diff --git a/std/encoding/testdata/string.toml b/std/encoding/testdata/string.toml new file mode 100644 index 000000000..f811824eb --- /dev/null +++ b/std/encoding/testdata/string.toml @@ -0,0 +1,30 @@ +[strings] +str0 = "deno" +str1 = """ +Roses are not Deno + Violets are not Deno either""" +# On a Unix system, the above multi-line string will most likely be the same as: +str2 = "Roses are not Deno\nViolets are not Deno either" + +# On a Windows system, it will most likely be equivalent to: +str3 = "Roses are not Deno\r\nViolets are not Deno either" +str4 = "this is a \"quote\"" + +str5 = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +str6 = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ +lines = ''' +The first newline is +trimmed in raw strings. + All other whitespace + is preserved. +'''
\ No newline at end of file diff --git a/std/encoding/testdata/table.toml b/std/encoding/testdata/table.toml new file mode 100644 index 000000000..7008e6fb0 --- /dev/null +++ b/std/encoding/testdata/table.toml @@ -0,0 +1,13 @@ +[deeply.nested.object.in.the.toml] +name = "Tom Preston-Werner" + +[servers] + + # Indentation (tabs and/or spaces) is allowed but not required + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc20"
\ No newline at end of file |