From 4713082a573f84b590d754fc5c53008ece96e751 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Wed, 20 Feb 2013 14:37:53 +0400 Subject: [PATCH] added few tests for reflow paragraph --- python/testData/fillParagraph/comment.py | 3 +++ .../testData/fillParagraph/commentSecondParagraph.py | 3 +++ .../fillParagraph/commentSecondParagraph_after.py | 4 ++++ python/testData/fillParagraph/comment_after.py | 4 ++++ .../testData/fillParagraph/docstringOneParagraph.py | 8 ++++++++ .../fillParagraph/docstringOneParagraph_after.py | 9 +++++++++ .../com/jetbrains/python/PyFillParagraphTest.java | 12 ++++++++++++ 7 files changed, 43 insertions(+) create mode 100644 python/testData/fillParagraph/comment.py create mode 100644 python/testData/fillParagraph/commentSecondParagraph.py create mode 100644 python/testData/fillParagraph/commentSecondParagraph_after.py create mode 100644 python/testData/fillParagraph/comment_after.py create mode 100644 python/testData/fillParagraph/docstringOneParagraph.py create mode 100644 python/testData/fillParagraph/docstringOneParagraph_after.py diff --git a/python/testData/fillParagraph/comment.py b/python/testData/fillParagraph/comment.py new file mode 100644 index 000000000000..b37f5a353809 --- /dev/null +++ b/python/testData/fillParagraph/comment.py @@ -0,0 +1,3 @@ +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj + +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj \ No newline at end of file diff --git a/python/testData/fillParagraph/commentSecondParagraph.py b/python/testData/fillParagraph/commentSecondParagraph.py new file mode 100644 index 000000000000..d3b135417b0f --- /dev/null +++ b/python/testData/fillParagraph/commentSecondParagraph.py @@ -0,0 +1,3 @@ +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj + +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj \ No newline at end of file diff --git a/python/testData/fillParagraph/commentSecondParagraph_after.py b/python/testData/fillParagraph/commentSecondParagraph_after.py new file mode 100644 index 000000000000..4aee8747052f --- /dev/null +++ b/python/testData/fillParagraph/commentSecondParagraph_after.py @@ -0,0 +1,4 @@ +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj + +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl +# j;sldjg ;jsd;gj \ No newline at end of file diff --git a/python/testData/fillParagraph/comment_after.py b/python/testData/fillParagraph/comment_after.py new file mode 100644 index 000000000000..95686a0c68d5 --- /dev/null +++ b/python/testData/fillParagraph/comment_after.py @@ -0,0 +1,4 @@ +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl +# j;sldjg ;jsd;gj + +# my new string blah blah blah ;j;dsjv sd;fj;dsjf;ds js;djgf ;jsg s;dgj; sjd;gj sd;gj ;sjg;j asdl j;sjdg; jasdgl j;sldjg ;jsd;gj \ No newline at end of file diff --git a/python/testData/fillParagraph/docstringOneParagraph.py b/python/testData/fillParagraph/docstringOneParagraph.py new file mode 100644 index 000000000000..d953c54e893c --- /dev/null +++ b/python/testData/fillParagraph/docstringOneParagraph.py @@ -0,0 +1,8 @@ +__author__ = 'ktisha' + +def foo(): + """ + This is my docstring. There are many like it, but this one mine. My docstring is my best friend. it is my life. I must master it as I must master my life. + + This is my docstring. There are many like it, but this one mine. My docstring is my best friend. it is my life. I must master it as I must master my life. + """ \ No newline at end of file diff --git a/python/testData/fillParagraph/docstringOneParagraph_after.py b/python/testData/fillParagraph/docstringOneParagraph_after.py new file mode 100644 index 000000000000..27aa3e368537 --- /dev/null +++ b/python/testData/fillParagraph/docstringOneParagraph_after.py @@ -0,0 +1,9 @@ +__author__ = 'ktisha' + +def foo(): + """ + This is my docstring. There are many like it, but this one mine. My docstring is my best friend. it is my life. I must master it as I must master my life. + + This is my docstring. There are many like it, but this one mine. My docstring is my best friend. it is my life. I + must master it as I must master my life. + """ \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyFillParagraphTest.java b/python/testSrc/com/jetbrains/python/PyFillParagraphTest.java index 4f33c590f64e..9e863d1a6d20 100644 --- a/python/testSrc/com/jetbrains/python/PyFillParagraphTest.java +++ b/python/testSrc/com/jetbrains/python/PyFillParagraphTest.java @@ -16,10 +16,22 @@ public class PyFillParagraphTest extends PyTestCase { doTest(); } + public void testDocstringOneParagraph() { + doTest(); + } + public void testString() { doTest(); } + public void testComment() { + doTest(); + } + + public void testCommentSecondParagraph() { + doTest(); + } + private void doTest() { String baseName = "/fillParagraph/" + getTestName(true); myFixture.configureByFile(baseName + ".py");