blob: ecbcbc068930ed43b02a1566a4a7917e3b18798c [file] [log] [blame]
// Simple tests to ensure that we can parse weird tars found on pub.
// The test cases were found by running an earlier version of this package
// across all packages and versions found on This package needs to
// be able to read every package version ever uploaded to pub.
import 'dart:io';
import 'package:tar/tar.dart';
import 'package:test/test.dart';
void main() {
const onceBroken = [
for (final package in onceBroken) {
test('can read $package', () async {
final file = File('reference/pub/$package.tar.gz');
final tarStream = file.openRead().transform(gzip.decoder);
final reader = TarReader(tarStream, disallowTrailingData: true);
while (await reader.moveNext()) {}