Skip to content

Create unit tests for auto indentation #1314

Closed as not planned
Closed as not planned

Description

We've had a number of bugs & fixes related to auto-indentation.
We need to ensure we do not regress.

Create unit tests for the following rules:

    languages.setLanguageConfiguration(PYTHON.language!, {
        onEnterRules: [
            {
                beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async)\b.*/,
                action: { indentAction: IndentAction.Indent }
            },
            {
                beforeText: /^\s*#.*/,
                afterText: /.+$/,
                action: { indentAction: IndentAction.None, appendText: '# ' }
            },
            {
                beforeText: /^\s+(continue|break|return)\b.*/,
                afterText: /\s+$/,
                action: { indentAction: IndentAction.Outdent }
            }
        ]
    });

Activity

  1. DonJayamanne commented on Apr 24, 2018

    @DonJayamanne
    Author

    Another issue #1461 that would need to be tested.

  2. removed this from the June 2018 milestone on Jun 4, 2018
  3. added a commit that references this issue on Jul 18, 2018
    e54947e
  4. luabud commented on Sep 11, 2019

    @luabud
    Member

    Don Jayamanne (@DonJayamanne) can we consider the cases in the description as fixed ? (#6939)

  5. DonJayamanne commented on Sep 11, 2019

    @DonJayamanne
    Author

    Not until, we have UI tests for this.

  6. karrtikr commented on Dec 20, 2022

    @karrtikr

    This is now supported by Pylance so closing this.

  7. locked as resolved and limited conversation to collaborators on Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions