Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate some rendeing test #749

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Sep 9, 2024

Some test can be concatenated. It will improve readability and also makes test a bit fast.

def test_foo1
  long_setup
  write foo1
  assert_screen(foo1)
  close
end

def test_foo1_and_foo2
  long_setup
  write foo1
  write foo2
  assert_screen(foo2)
  close
end

def test_foo1_and_foo2_and_foo3
  long_setup
  write foo1
  write foo2
  write foo3
  assert_screen(foo3)
  close
end

# ↓

def test_foo
  long_setup
  write foo1
  assert_screen(foo1)
  write foo2
  assert_screen(foo2)
  write foo3
  assert_screen(foo3)
  close
end

Concatenated tests

test_bracketed_paste_with_undo
test_bracketed_paste_with_undo_redo

test_longer_than_screen_height
test_longer_than_screen_height_with_scroll_back
test_longer_than_screen_height_with_complex_scroll_back

test_autocomplete_long_with_scrollbar
test_autocomplete_long_with_scrollbar_scroll

Some test should be concatenated for readability.
Example: undo test and undo_and_redo test can be concatenated.
@tompng tompng force-pushed the compact_rendering_test branch from 4e331cc to d959a35 Compare October 3, 2024 16:23
@tompng tompng marked this pull request as ready for review October 3, 2024 16:33
Copy link
Member

@ima1zumi ima1zumi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ima1zumi ima1zumi merged commit 41b5414 into ruby:master Oct 4, 2024
40 checks passed
@tompng tompng deleted the compact_rendering_test branch October 4, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants