Skip to content
Closed

CI Test #78709

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Buffers;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;

using Xunit;
using Xunit.Abstractions;

namespace System.Net.Http.Tests
{
public class Encode5987ReproTest
{
private static readonly IndexOfAnyValues<byte> s_rfc5987AttrBytes =
IndexOfAnyValues.Create("!#$&+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~"u8);

private readonly ITestOutputHelper _output;

public Encode5987ReproTest(ITestOutputHelper output)
{
_output = output;
}

[Fact]
public void IndexOfAnyExceptTest()
{
ReadOnlySpan<byte> bytes = new byte[] { 70, 105, 108, 101, 195, 131, 78, 97, 109, 101, 46, 98, 97, 116 };

int offset = bytes.IndexOfAnyExcept(s_rfc5987AttrBytes);
_output.WriteLine($"s_rfc5987AttrBytes is {s_rfc5987AttrBytes.GetType().FullName}");

Assert.Equal(4, offset);
}
}

public class ContentDispositionHeaderValueTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace System
{
public partial class String
{
// Hi
private const int StackallocIntBufferSizeLimit = 128;

private static void FillStringChecked(string dest, int destPos, string src)
Expand Down