1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-22 15:02:51 +02:00

add more selection tests

This commit is contained in:
Ian Storm Taylor
2018-08-03 15:36:43 -07:00
parent ff598bc5a1
commit adfc093e4e
13 changed files with 403 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfBlock()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfBlock()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
t<cursor />wo
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfBlock()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
<cursor />two
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
t<cursor />wo
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
<cursor />two
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToEndOfDocument()
}
export const input = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToStartOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
two<cursor />
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToStartOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
t<cursor />wo
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToStartOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>
<cursor />two
</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToStartOfDocument()
}
export const input = (
<value>
<document>
<paragraph>one</paragraph>
<paragraph>two</paragraph>
<paragraph>
three<cursor />
</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)

View File

@@ -0,0 +1,31 @@
/** @jsx h */
import h from '../../../helpers/h'
export default function(change) {
change.moveToStartOfDocument()
}
export const input = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)
export const output = (
<value>
<document>
<paragraph>
<cursor />one
</paragraph>
<paragraph>two</paragraph>
<paragraph>three</paragraph>
</document>
</value>
)