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

feat: Issues-116 support options for WriteToTTML #117

Conversation

min0625
Copy link
Contributor

@min0625 min0625 commented Oct 5, 2024

Issue: #116

ttml_test.go Outdated

func TestTTMLWithOptionsNoIndent(t *testing.T) {
// Open
s, err := astisub.OpenFile("./testdata/example-in-no-indent.ttml")
Copy link
Owner

Choose a reason for hiding this comment

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

Why add this new in file? Can't you use ./testdata/example-in.ttml directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why add this new in file?

I want to decouple the test file in the two test cases, so I add a new file for the test case.

Can't you use ./testdata/example-in.ttml directly?

Yes, I can use directly, If you think it is better.

Copy link
Owner

Choose a reason for hiding this comment

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

I understand but I'd rather use ./testdata/example-in.ttml here 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will fix it soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes: commit

ttml_test.go Outdated
@@ -68,3 +68,20 @@ func TestTTMLBreakLines(t *testing.T) {

assert.Equal(t, strings.TrimSpace(string(c)), strings.TrimSpace(w.String()))
}

func TestTTMLWithOptionsNoIndent(t *testing.T) {
Copy link
Owner

Choose a reason for hiding this comment

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

Can you rename this test to TestWriteToTTMLWithIndentOption?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will rename it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes: commit

@asticode asticode merged commit a3932fd into asticode:master Oct 7, 2024
1 check passed
@asticode
Copy link
Owner

asticode commented Oct 7, 2024

Thanks for the PR! ❤️

Let me know whether you need a tag 👍

@min0625
Copy link
Contributor Author

min0625 commented Oct 7, 2024

Yes, I need a tag. Thank you!

@min0625 min0625 deleted the feat/issues-116-support-options-for-writetottml branch October 7, 2024 13:13
@asticode
Copy link
Owner

asticode commented Oct 7, 2024

I've created the v0.28.0 tag 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants