summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2018-12-17 19:11:38 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-12-17 19:11:38 +0900
commit3bcb344ecb4940529c02226b16dde2b6d32f0bcd (patch)
tree3695f30f1ddefaee3ea6ee037cfa9876516a0fad /test
parentRefactor Reversi (#3584) (diff)
downloadsharkey-3bcb344ecb4940529c02226b16dde2b6d32f0bcd.tar.gz
sharkey-3bcb344ecb4940529c02226b16dde2b6d32f0bcd.tar.bz2
sharkey-3bcb344ecb4940529c02226b16dde2b6d32f0bcd.zip
Re: #3457 (#3614)
* Update parser.ts * Update user.ts * Update search.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update mfm.ts * Update parser.ts * Merge branch 'develop' into 3440-mk2 * Fix typo * Update parser.ts * Update mfm.ts * Update mfm.ts
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/mfm.ts b/test/mfm.ts
index 0611076473..dee1bb2aea 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -168,6 +168,22 @@ describe('Text', () => {
]),
node('mention', { acct: '@a', canonical: '@a', username: 'a', host: null })
], tokens3);
+
+ const tokens4 = analyze('@\n@v\n@veryverylongusername' /* \n@toolongtobeasamention */ );
+ assert.deepEqual([
+ text('@\n'),
+ node('mention', { acct: '@v', canonical: '@v', username: 'v', host: null }),
+ text('\n'),
+ node('mention', { acct: '@veryverylongusername', canonical: '@veryverylongusername', username: 'veryverylongusername', host: null }),
+ // text('\n@toolongtobeasamention')
+ ], tokens4);
+ /*
+ const tokens5 = analyze('@domain_is@valid.example.com\n@domain_is@.invalid\n@domain_is@invali.d\n@domain_is@invali.d\n@domain_is@-invalid.com\n@domain_is@invalid-.com');
+ assert.deepEqual([
+ node('mention', { acct: '@domain_is@valid.example.com', canonical: '@domain_is@valid.example.com', username: 'domain_is', host: 'valid.example.com' }),
+ text('\n@domain_is@.invalid\n@domain_is@invali.d\n@domain_is@invali.d\n@domain_is@-invalid.com\n@domain_is@invalid-.com')
+ ], tokens5);
+ */
});
});